Oct 7, 2005, 1:48 AM
Post #3 of 4
The point that people sometimes miss about regular expressions is that you only need to write enough of it to match the bit of the test that you need. Therefore most of your regex is unnecessary. You can do it like this:
And, as KevinR has pointed out, if it always appears at the end of the string you can add that information into the regex too.
Dave Cross, Perl Hacker, Trainer and Writer
Get more help at Perl Monks