<< 19 March 2007 | Home | 21 March 2007 >>

Small regexp tip

To find the shortest match in a using using regular expressions you can use a "Reluctant" qualifier like ".+?" instead of simply ".+" (greedy qualifier) which will find the longest match.

Wow - did that make my day!! :-)

Tags :