> Hello tbudl,

> OK, a RegEx question:

> I am receiving hundreds of spam messages that contain the following
> text, with the numeric part in the brackets varying endlessly -

> "Re: [1/53]: Reday 2 Odrer olinne"

> How do I pattern match the "[1/53]" and all the endless numeric and
> text variations to send them expeditiously to my spam folder?  I've
> read the help files and just can't seem to get it right.  The brackets
> and the numbers combination vary, with up to 3 numeric characters
> either side of the forward slash.

\[[0-9]{1,3}\/[0-9]{1,3}\]

Match the character "[" literally «\[»
Match a single character in the range between "0" and "9" «[0-9]{1,3}»
   Between one and 3 times, as many times as possible, giving back as needed 
(greedy) «{1,3}»
Match the character "/" literally «\/»
Match a single character in the range between "0" and "9" «[0-9]{1,3}»
   Between one and 3 times, as many times as possible, giving back as needed 
(greedy) «{1,3}»
Match the character "]" literally «\]»


Created with RegexBuddy

I can recommend:

http://www.regexbuddy.com/

and

http://www.regular-expressions.info/

-- 
Marten Gallagher
Annery Kiln Web Design
www.annerykiln.co.uk
Using The Bat! 3.5.25
with POPFile 0.22.1
on Windows XP 5.1 



________________________________________________
Current version is 3.5.25 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html

Reply via email to