So I'm talking about stuff like NFAs (nondeterministic finite state automata) DFAs (deterministic finite state automata).These concepts are nowhere near as complicated as their names make them sound they are in fact generally quite intuitive, a reasonable grounding in basic set theory will help you here.
It will also give you a much better understanding of how programming languages are interpreted 'under the hood', in fact one of the first things any compiler/interpreter does to your code is essentially run it through a fancy regex engine.
This leads you on to making realizations not only about the performance implications of pattern matching in text, but they are also keys to solving a variety of problems in a simple way.
In reference to a specific text, I learned the concept from the early chapters of 'the dragon book' but I'm sure gentler introductions are available.
Have you screamed yet, for example in the US the exact same phone number can be written like so, some of the variants I have seen:
(516)-123-4567
1(516)-123-4567
1-516-123-4567
123-4567 old fashioned but valid
1.516.123.4567
now with a parser I can use RE for the simple bits that turn a text stream into bits of data and then hand it off to the to the parser to figure out if it is a good phone number. So the lexer, where the simple RE live, can turn a stream of text into a stream of tokens that the parser can reason about, for my US example above here is the list:
1: a string of digits called NUMBER and what they are
2: a ( called LP
3: a ) called RP
4: a - called DASH
5: a . called DOT
Then I can parse the 5 things above to figure out is it a valid phone number in nice readable and maintainable code.
Doing the above also makes you much more immune to changes in the RE libs behavior, I have gotten bit by greediness changes in perl before on bug fix releases because I did not follow my above advice. Another benefit is that in 6 months is that you can figure out what you did and so can the next guy
(I just checked, there is an early LregexTHW. I'm going to be doing some reading.)