Aug 24, 2009 #1 Laeg Programmer Nov 29, 2004 95 IE Dim rx As New Regex("/^0\d{1,3)-\d{5,7}/") If(Not(rx.IsMatch("01-12345")))Then ' Why is this executed? End if Can anyone tell me why the pattern above does not match the string?
Dim rx As New Regex("/^0\d{1,3)-\d{5,7}/") If(Not(rx.IsMatch("01-12345")))Then ' Why is this executed? End if Can anyone tell me why the pattern above does not match the string?
Aug 27, 2009 #2 NESWalt Programmer Oct 8, 2007 99 US A couple things: 1. Your regex requires the '/' character 2. You have a ')' instead of a '}' try "^\d{1,3}-\d{5,7}" Upvote 0 Downvote
A couple things: 1. Your regex requires the '/' character 2. You have a ')' instead of a '}' try "^\d{1,3}-\d{5,7}"
Aug 27, 2009 #3 NESWalt Programmer Oct 8, 2007 99 US Check out http://www.ultrapico.com/ for a pretty decent Regex create/generator/tester. It's what I use most of the time. Upvote 0 Downvote
Check out http://www.ultrapico.com/ for a pretty decent Regex create/generator/tester. It's what I use most of the time.