in reply to Regex to match ascending sequence
my $regex = qr# (\d) (??{ my $c //= $1 ; ++$c })+ #x; "2345654321" =~ $regex; print $&;
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex to match ascending sequence
by ExReg (Priest) on Oct 15, 2015 at 17:27 UTC | |
by Laurent_R (Canon) on Oct 15, 2015 at 22:31 UTC | |
by LanX (Saint) on Oct 15, 2015 at 18:14 UTC | |
by Anonymous Monk on Oct 15, 2015 at 17:30 UTC | |
by ExReg (Priest) on Oct 15, 2015 at 17:38 UTC |