By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,185 Members | 1,420 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,185 IT Pros & Developers. It's quick & easy.

Regular Expression [ and ]

P: n/a
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!!!!!!!!
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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)

"Jim Heavey" <Ji*******@nospam.com> wrote in message
news:Xn*********************************@207.46.24 8.16...
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!!!!!!!!

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.