in reply to Re: Regular Expression To Extract Multiple Matches Pattern
in thread Regular Expression To Extract Multiple Matches Pattern
I was working on a regular expression today to extract phrases like "not-too-shabby" and "never-before-seen",. that is, three words separated by hyphens
The original post does talk about 'extracting' not 'replacing'. And something like print $1; always raises a red flag for me -- you usually want print "$1\n"; instead, otherwise the doubly hyphenated words that the script has found will run into each other -- probably not what you want.
--t. alex
"Excellent. Release the hounds." -- Monty Burns.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Regular Expression To Extract Multiple Matches Pattern
by Kanji (Parson) on Jan 07, 2002 at 20:15 UTC | |
by Cody Pendant (Prior) on Jan 08, 2002 at 01:02 UTC |