in reply to Regex: Matching around a word(s)
I think asking whether a regex is the best way to do this really gets at the heart of the problem. Regexes are great for matching text, but not so hot for parsing it. In this case, I rather think you're in kind of a grey, middle area.
In your place, I might look at Text::ExtractWords. Combine that with Text::Sentence and you could have a very flexible solution that's easier to maintain.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex: Matching around a word(s)
by shotgunefx (Parson) on Dec 17, 2005 at 01:04 UTC | |
by nothingmuch (Priest) on Dec 17, 2005 at 19:54 UTC | |
by shotgunefx (Parson) on Dec 18, 2005 at 00:14 UTC | |
by BrowserUk (Patriarch) on Dec 17, 2005 at 20:10 UTC | |
by nothingmuch (Priest) on Dec 18, 2005 at 00:14 UTC |