gryphon has asked for the wisdom of the Perl Monks concerning the following question:
Greetings fellow monks...
This is a fairly silly regex question, but I'm loosing my mind over it. Please help. :) Right now I have:
/(\W|\b)($worda)(\W+)($wordb)(\W|\b)/It's the center (\W+) that's the problem. Right now this matches most of what I need. However, it misses in when the text I'm searching has something like "worda <U>wordb".
What I'd like to do is have something like:
(\W+|<.?>|<.?>\W+|\W+<.?>|<.?>\W+<.?>|...)In other words, find me \W+ but ignore all HTML tags (but include them in $3). See, I told you this was a silly and probably obvious question. But I'm stuck. Please help. Thanks. :)
-Gryphon.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: Silly Regex question...
by Ovid (Cardinal) on Jan 11, 2001 at 04:10 UTC | |
by chipmunk (Parson) on Jan 11, 2001 at 07:59 UTC | |
|
Re: Silly Regex question...
by chipmunk (Parson) on Jan 11, 2001 at 04:15 UTC | |
by Ovid (Cardinal) on Jan 11, 2001 at 04:20 UTC | |
by chipmunk (Parson) on Jan 11, 2001 at 07:37 UTC | |
by salvadors (Pilgrim) on Jan 12, 2001 at 01:58 UTC | |
by gryphon (Abbot) on Jan 11, 2001 at 04:29 UTC | |
|
Re: Silly Regex question...
by gryphon (Abbot) on Jan 11, 2001 at 04:22 UTC |