in reply to Re^2: regex finding longest string containing n of $c
in thread regex finding shortest string containing n of $c
A regex is not going to do it for you because it will find the first match regardless of the length of the match. If you need to find the shortest (or longest) match then you need to find all the matches and select the best. A regex on it's own generally doesn't do that.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: regex finding longest string containing n of $c
by xipho (Scribe) on Sep 01, 2005 at 05:01 UTC |