12 ms·
This might be overkill but I found I never "got" regular expressions until a class made me think about them as state machines. The additional bashing over the h
by wonnage 13y ago
This might be overkill but I found I never "got" regular expressions until a class made me think about them as state machines. The additional bashing over the head of having to implement a parser/matcher made it really stick. The quirks and syntax make much more sense when you know why and how a regex engine works.
That said, anything involving extended/perl regex I wind up googling.
- sliverstorm 13y agoHuh, to me I "got" regexp the first time I used it (although it took a while to learn the details). To me if you understand the idea of wildcards, you understand regexp.
- omnibrain 13y agoI began to understand Regex after reading the awk chapter in Masterminds of Programming. After that I understood how "the machine" inside might work. I really understood how to apply Regex to single strings after I started to see a regex as a "mask", so very similar to your wildcard approach.