in reply to Re: Re: Regular Expression To Extract Multiple Matches Pattern
in thread Regular Expression To Extract Multiple Matches Pattern
Further on down in the post, Cody says ...
...but surely there's a smarter way to do it than check there's a match, then extract it with one regex, then remove it from the test string with another?
Perhaps I'm reading the bolded part of that wrong, but it sounds like replacing to me; a notion reinforced by the code snippet given.
The $1 was an oversight, though: an artifact of using -l in my shebang. ;)
--k.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Regular Expression To Extract Multiple Matches Pattern
by Cody Pendant (Prior) on Jan 08, 2002 at 01:02 UTC |