try ^(F|K)[0-9]{4}$

Thanks for that Mark! Worked like a charm, however, I need to make an amendment to the above expression.


I need to make this have an optional 3 characters on the end in the form -99. In other words I need to write an expression that will match F1234, F1234-, F1234-5 and F1234-56
At this point I'm all regex'd out. Any help would be appreciated.


um, methinks this'll do the trick...
"^(F|K)[0-9]{4}((\-)|(\-[0-9]{1,2}))?$"
the extra bit just says optionally match a single hyphen or a hyphen followed by one or two numbers



Mark


-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to