laziness, impatience, and hubris | |
PerlMonks |
Re: RegEX Doubtby Athanasius (Archbishop) |
on Aug 19, 2014 at 12:07 UTC ( [id://1097969]=note: print w/replies, xml ) | Need Help?? |
Hello sandy105, Yes, you have to allow for text such as “info - ” between the bracketed parts. But you don’t have to capture it. No need to capture the contents of the third bracketed part either, if you don’t need it:
Output:
Note: I’ve added an /x modifier to the regex and whitespace within to make it easier to read. Hope that helps,
In Section
Seekers of Perl Wisdom
|
|