diff options
author | John Ankarström <john@ankarstrom.se> | 2021-05-26 01:59:23 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-05-26 01:59:23 +0200 |
commit | fefdf52038424752787fa68456cfd6ff715621e8 (patch) | |
tree | 2517ee8680a1e5ec99f342f1672128605d466ca0 | |
parent | 9898bb516d6c1dd91df907896820d14d72b3ab0f (diff) | |
download | mum-fefdf52038424752787fa68456cfd6ff715621e8.tar.gz |
mum: Change regex formatting
-rwxr-xr-x | src/mum | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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; |