From fefdf52038424752787fa68456cfd6ff715621e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 26 May 2021 01:59:23 +0200 Subject: mum: Change regex formatting --- src/mum | 22 +++++++++++----------- 1 file 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 = () }) ( (?&ref) | (?&ref),(?&ref) | (?&grep) ) - (?{ push @range, \%ref }) + (?{ push @range, \%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 = (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) }) )? ) - (? g((?&next)) (?{ local %ref = (grep => $^R) }) + (? g((?&next)) (?{ local %ref = (grep => $^R) }) ) - (? /(([^/\\]++ | \\.)*+)/ (?{ $^N }) + (? /(([^/\\]++ | \\.)*+)/ (?{ $^N }) ) - (? \?(([^?\\]++ | \\.)*+)\? (?{ $^N }) + (? \?(([^?\\]++ | \\.)*+)\? (?{ $^N }) ) ) }x; -- cgit v1.2.3