Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want everything removed from the first occurence of whatever my word is, in the example above it is TEST. I know there must be a way to do this without having to subsitute the word back in, right? Can you help me?$data =~ s/.+TEST/TEST/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do you make a regex non greedy
by GrandFather (Saint) on Mar 20, 2011 at 04:53 UTC | |
|
Re: How do you make a regex non greedy
by Anonymous Monk on Mar 20, 2011 at 03:33 UTC | |
by GrandFather (Saint) on Mar 20, 2011 at 04:56 UTC | |
by Anonymous Monk on Mar 20, 2011 at 05:03 UTC | |
|
Re: How do you make a regex non greedy
by wind (Priest) on Mar 20, 2011 at 04:23 UTC | |
by GrandFather (Saint) on Mar 20, 2011 at 04:56 UTC | |
by Anonymous Monk on Mar 20, 2011 at 05:05 UTC |