
davorg
Thaumaturge
/ Moderator
Oct 7, 2005, 1:48 AM
Post #3 of 4
(1845 views)
|
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 http://www.dave.org.uk/ Get more help at Perl Monks
|