The problem with this is that the [0-9]{1,5} part will accept "123456" as true,
which it technically is, but not what is wanted. It should only allow 1 to 5
digits in the first part, but not more. That's the problem.
>Not tested: [0-9]{1,5}(\-[0-9]{3})?
>
>You may need to wrap in slashes: /[0-9]{1,5}(\-[0-9]{3})?/
>
>> ...trying to build a javascript
>> regExp for the following pattern:
>> [1-5 digits] [optional hyphen and 3 digits]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application
http://www.houseoffusion.com/banners/view.cfm?bannerid=48
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209678
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54