Even after years of programming, I\'m ashamed to say that I\'ve never really fully grasped regular expressions. In general, when a problem calls for a regex, I can usually (afte
There's an interesting (if slightly short) chapter in Beautiful Code by Brian Kernighan, appropriately called "A Regular Expression Matcher". In it he discusses a simple matcher that can match literal characters, and the .^$* symbols.