in reply to regex capturing problem
You can't use + on parens like that to "remember" any number of matches - that's one of the reasons to have split. As for why it only gives the last part, is that matches are greedy (unless you tell them not to be) and will get the largest match they can - here the end of your string.
Cheers,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: regex capturing problem
by demerphq (Chancellor) on Mar 21, 2002 at 15:16 UTC |