Regular expressions are great, but they're a bit unwieldy. There's a well-known quote about regular expressions that goes like this: Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. I think of it whenever I try to tackle something using regular expressions, but most of the time, I spend more time wrestling with the regular expr