in reply to mysteries of regex substring matching
Another workaround was so trivial that I skipped it in my previous answer
You can build regexes from smaller ones with string interpolation
DB<73> p $capt4 = '(....)' x 4 (....)(....)(....)(....) DB<74> x $x =~ m/ $capt4 (.+) /x 0 'AAD3' 1 4017 2 8372 3 '01D9' 4 '8AAED18778DEF993' DB<75>
I think that's the most readable solution.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mysteries of regex substring matching
by LanX (Saint) on Jan 16, 2021 at 00:49 UTC |