I'm looking to replace these lines with a pcre but it doesn't seem to be
working. Any suggestions?
BODY 175 CONTAINS 206 888-2083
BODY 175 CONTAINS 206.8882083
BODY 175 CONTAINS 2068882083
BODY 175 CONTAINS 206-8882083
BODY 175 CONTAINS 206 8882083
BODY 175 PCRE
Scot, my eyes water when I look at a long regexp.
So without trying to work out that specific PCRE syntax, I'll suggest
two things:
1) Make a generic detection that finds zero or more junk characters
between the text you're looking for. The longer the parent string is,
the less likely you are
Scott,
The following should do the same. Note that I do not know if Declude
requires the whole match to be placed in parenthesis.
2[0Oo]6[\s\r\n\-\.]*888[\s\r\n\-\.]*2[0Oo]83
Matt
Scott Fisher wrote:
I'm looking to replace these lines with a pcre but it doesn't seem to
be working.
This would match on all you have provided, the . meaning any character
including a space {0,1} means min of 0 max of 1
(206.{0,1}888.{0,1}2083)
If you wanted to use detect O as well as the 0 [o0] also you could use the ?i:
meaning case insensitive:
(?i:2[o0]6.{0,1}888.{0,1}2[o0]83)
David B
Dave,
{0,1} = ?
{0,} = *
{1,} = +
Also note that beginning a sub-match with a (? improves PCRE's
performance because it tells it not to track the sub-matches, and the
engine likely has a hard limit in order to prevent an expression from
causing itself to become overly complicated with
I'm detecting a new country code *F.
Can you enlighten me to what this is?
---
This E-mail came from the Declude.JunkMail mailing list. To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type unsubscribe Declude.JunkMail. The archives can be found
at http://www.mail-archive.com.