From: Simon Strandgaard Date: 2004-09-20T17:04:19+09:00 Subject: Re: regular expression seems broken not greedy when it should be On Monday 20 September 2004 09:54, CarlosRivera wrote: [snip] > I thought that normally * was greedy and would try to match the largest > string and not the tiniest. If this is the case the "<<<" and ">>>" > should be around the number "123" in the output for the first attempt [snip] Regexp usualy follows the left-most-longest rule.. in your case the longest expression * can find is the empty string. -- Simon Strandgaard