in reply to Re: Regex help
in thread Regex help
The 1 while resursive subsitution trick is useful for this sort of problem. See my example above. I prefer a negated char class ie [^\]] in this example to an un-greedy .+? as it saves backtracking +/- improves accuracy as it is slightly more specific and it allows \n for example where . does not by default.
Lots of ways to skin the cat, provided we can make a nice tasty stew TIMTOWDI.
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex help
by ysth (Canon) on Aug 01, 2004 at 05:54 UTC | |
by tachyon (Chancellor) on Aug 01, 2004 at 08:31 UTC |