chiark / gitweb /
wip
[pandemic-rising-tide.git] / parse-input-graph
index f6f418929062a2baabd56a442297da892343017a..71810021e8280819f68d51721c73aa6f9f5ccfbf 100755 (executable)
@@ -40,7 +40,10 @@ sub read_in () {
       if ($aref =~ m{\.}) {
        $adj->{Pattern} = $aref;
        $aref =~ s{\-}{[^- ]*-}g;
-       $aref =~ s{\.}{[^- ]* ?}g;
+       $aref =~ s{\.+}{
+            length $& eq 1 ? qr{[^- ]* ?} :
+            length $& eq 2 ? qr{.*}       : confess "$aref"
+        }ge;
        $adj->{Regexp} = $aref;
       } else {
        $adj->{Name} = $aref;