|
|
| go ahead... be a heretic | |
| PerlMonks |
Re^2: Reusing a complex regexp in multiple spots, escaping the regexpby LanX (Saint) |
| on Apr 12, 2026 at 22:40 UTC ( [id://11167528]=note: print w/replies, xml ) | Need Help?? |
|
On a tangent, what is the benefit of (?(DEFINE) ...) constructs for repeated patterns here? Intuitively, I would have opted for interpolating nested $variables holding qr// snippets, especially since I can make them more readable with /x and can unit test them individually. But I'm curious to learn why you chose this way. Is it about the handling of capture groups? I tried to read the relevant docs, but they constantly mention recursion and I can't spot any here...
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||