in reply to Re^2: Regular Expression Test
in thread Regular Expression Test
tybalt89 is combining the \G meta with //gc modifiers
And after combining with recursive calls this permits to parse nested structures.
See perldocs for examples and details of this technique (e.g. perlretut ) or Friedl's Regex Book.
Or even better older threads in the monastery :)
You shouldn't be despaired, the demonstrated code is neither easy to read nor maintain.
It should better use //x modifiers and more comments, but obfuscated wizardry is of course cooler! ;-))
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regular Expression Test
by tybalt89 (Monsignor) on May 07, 2017 at 19:04 UTC | |
by LanX (Saint) on May 07, 2017 at 19:26 UTC | |
|
Re^4: Regular Expression Test
by shmem (Chancellor) on May 06, 2017 at 20:30 UTC | |
by LanX (Saint) on May 06, 2017 at 21:10 UTC |