|There's more than one way to do things|
Re^2: Regex for outside of bracketsby mr_ron (Chaplain)
|on Jul 16, 2018 at 00:31 UTC||Need Help??|
Are you sure you want a match, and that you can only use a single regex? I have bad news... a regular language has no context. ... Regexes will only solve a subproblem of your problem.
from ISBN 9780596004927: Programming Perl (4th Ed), Pattern Matching - Chapter 5, p. 167
If you're acquainted with regular expressions from some other venue, we should warn you that regular expressions are a bit different in Perl. First they aren't entirely "regular" in the theoretical sense of the word, which means they can do much more than the traditional regular expressions taught in Computer Science classes.Mentioned similarly in Wikipedia
Brackets with Perl regex is a FAQ, Can I use Perl regular expressions to match balanced text?, and is also covered in Rosetta Code. The regex techniques used are relatively new(er) and somewhat advanced but other answers have discussed modules that hide the technique behind a simple interface.
Correction based on feedback from mr_mischief below:
I also studied "regular languages"/"regular sets" in computer science and,