Regular Expression [ and ]

J

Jim Heavey

I created a regular expression and I used the following regular expression:
[a-zA-Z0-9.,:;+'_()$%!?<>\\/$#-@*=+\093\091\n\t\r\040]{1,1000}

I used \091 and \093 to indicate that "[" and "]" are valid characters, but
it seems to ignore those values as it will not allow me to enter those
values into the field where this reqular expression is associated.

How can I tell it to allow these characters to be keyed?

Also, I tried to use a bind expression such as ValidationExpression=<%#
GetValidationExpressionVal() %>, but it did not seem to like this. Any
reason I could not use a bind expression to pass the validation string into
the control?

Thanks for your assistance!!!!!!!!
 
G

Guest

Some of these characters need to be escaped and I believe you do not want \r
in there as \n covers Carriage returns (if I recall correctly.
Also make sure that your - character that you want right after the # ? if
that is referring to the actual - character to allow or exclude is at the
end of the whole group. That also is very important. Refer to the docs for
the exact term for the - (I believe it is used specifically for ranges but
may have more meanings)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Regular Expression 1
Regular expression problem 13
Regular Expression question 4
Regular Expression 3
Regular Expression Validator syntax 2
Regular expression 1
Regular Expression 2
Regular Expression! 3

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top