Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Regular Expression Validator seems to be wrong!

Thread Tools

Regular Expression Validator seems to be wrong!

Posts: n/a
I have the following control on my page:

<asp:regularexpressionvalidator id="RegularExpressionValidator1"
style="Z-INDEX: 104; LEFT: 355px; POSITION: absolute; TOP: 28px"
runat="server" Width="131px" Height="10px" ErrorMessage="The Postcode
is not in the correct format" ValidationExpression="
{1,2}[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)$"

The Validation Expression comes from here:

If I enter a valid postcode in regexlib's tester, I get a match.

If I enter a valid postcode in "txtPostCode", I get an error message.


The reading group's reading group:
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
regular expression seems broken not greedy when it should be CarlosRivera Ruby 2 09-21-2004 05:32 AM
P.O. Box Regular Expression Validator - heeeeeelp? Simple Simon ASP .Net 2 11-04-2003 05:10 PM
Regular Expression Validator Bryce Budd ASP .Net 1 09-18-2003 05:51 PM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM
Re: howto use c# regular expression validator to exclude file types Brian Vallelunga ASP .Net 2 07-31-2003 10:27 PM