in reply to Substitute _last_ occurence in string?
$string =~ s/two (.*?)$/$1/ should work, though after a little testing, I find that it does not. I don't know why. Anyone?
Scott
Update: I must admit, I like the trickyness of using the reverse.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Substitute _last_ occurence in string?
by Hofmator (Curate) on Jul 25, 2001 at 18:46 UTC |