summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-05-26 01:59:23 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-05-26 01:59:23 +0200
commitfefdf52038424752787fa68456cfd6ff715621e8 (patch)
tree2517ee8680a1e5ec99f342f1672128605d466ca0
parent9898bb516d6c1dd91df907896820d14d72b3ab0f (diff)
downloadmum-fefdf52038424752787fa68456cfd6ff715621e8.tar.gz
mum: Change regex formatting
-rwxr-xr-xsrc/mum22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mum b/src/mum
index a31f45d..de3f9c3 100755
--- a/src/mum
+++ b/src/mum
@@ -17,27 +17,27 @@ my @range; # range (one/two references)
our %ref; # current reference
my $d = qr{
(?(DEFINE)
- (?<range> (?{ @range = () })
+ (?<range> (?{ @range = () })
( (?&ref)
| (?&ref),(?&ref)
| (?&grep)
)
- (?{ push @range, \%ref })
+ (?{ push @range, \%ref })
)
- (?<ref> ( (\d+) (?{ local %ref = (line => $^N) })
- | (\.|\$) (?{ local %ref = (spec => $^N) })
- | ' ([a-z]) (?{ local %ref = (mark => $^N) })
- | (?&next) (?{ local %ref = (next => $^R) })
- | (?&prev) (?{ local %ref = (prev => $^R) })
+ (?<ref> ( (\d+) (?{ local %ref = (line => $^N) })
+ | (\.|\$) (?{ local %ref = (spec => $^N) })
+ | ' ([a-z]) (?{ local %ref = (mark => $^N) })
+ | (?&next) (?{ local %ref = (next => $^R) })
+ | (?&prev) (?{ local %ref = (prev => $^R) })
)
- ( ([+-] \d+) (?{ local %ref = (%ref, plus => 0+$^N) })
+ ( ([+-] \d+) (?{ local %ref = (%ref, plus => 0+$^N) })
)?
)
- (?<grep> g((?&next)) (?{ local %ref = (grep => $^R) })
+ (?<grep> g((?&next)) (?{ local %ref = (grep => $^R) })
)
- (?<next> /(([^/\\]++ | \\.)*+)/ (?{ $^N })
+ (?<next> /(([^/\\]++ | \\.)*+)/ (?{ $^N })
)
- (?<prev> \?(([^?\\]++ | \\.)*+)\? (?{ $^N })
+ (?<prev> \?(([^?\\]++ | \\.)*+)\? (?{ $^N })
)
)
}x;