martymart has asked for the wisdom of the Perl Monks concerning the following question:
The information I need from this is the result of the postmatch of this search. Trouble is the greedy quantifier. The expression is searching on a string like:<APPEND.*>
I would like the postmatch to give me back::<APPEND changed_date="02-02-2003">This is sample text</APPEND>
Instead, I think its matching to the '>' at the end of the string. What I need is to be able to tell the regex that the first time it encounters a '>' that it has achieved its match, is this possible? I would appreciate any ideas you may have on this.This is sample text</APPEND>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Regex a little less greedy please
by broquaint (Abbot) on Mar 18, 2003 at 14:19 UTC | |
Re: Regex a little less greedy please
by arturo (Vicar) on Mar 18, 2003 at 14:29 UTC | |
Re: Regex a little less greedy please
by MZSanford (Curate) on Mar 18, 2003 at 14:16 UTC | |
Re: Regex a little less greedy please
by roundboy (Sexton) on Mar 18, 2003 at 19:01 UTC |