Ray Jette wrote:
> Ray Jette wrote:
> > 
> > A lot of these rules look good but not appear to work for what I am
> > trying to do. Sorry about all the trouble. I'm not realy that good
> > at regular expressions but I am learning. Here are some real
> > examples from my mail server: 
> > 
> >    * PO1786
> >    * PO 42111
> >    * PO# 314980
> >    * PO#36605
> >    * PO 484579-0
> >    * PO:458121
> >    * PO: 6718972-1
> >    * PO's #47509
> >    * PO#v156-2008-003
> >    * PO-121556
> >    * PO's 47509
> > 
> > Some of these are million's of dollers worth of orders. I can't
> > loose these. I am trying to create a negative scoring rule. Thanks
> > for any help you can provide. Please let me know if you need any
> > more information. 
> > 
> > Ray Jette
> > 
> > 
> > 
> > 
> I am trying to write an expression to match above. I need to match the
> following
> PO /\bPO
> optional space /\bPO ?
> Optional # /\bPO ?#?
> Optional : /\bPO ?#?:?
> Optional ' /\bPO ?#?:?'?
> Optional s /\bPO ?#?:?'?s?
> Optional space after # or : before numbers - /\bPO ?#?:?'?s? ?
> Then I need numbers and letters - [0-9a-z]\{1,10\} - I may need need
> this. 
> 
> Thank you very much. I have been working on this for over a week and
> still can't seem to get it. It is critical that I get this working.

The first step is to simplify the problem.  Don't worry so much about
all of the optional stuff, look at the possibilities and see what they
have in common.  Then you can write an expression that will match the
common bits and skip over the optional bits.

There have been two or three examples posted that will work.  Pick one
and give it a try.

-- 
Bowie

Reply via email to