Entry validation

G

Guest

Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

pls help
 
G

Guest

Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

Try this

"\A([^\|\$|\^]*)\Z"
 
G

Guest

Badis,

There are few tools on regular expressions available. This will help you to
figure out thecomplex regular expressions you want.

An msdn artilces is recommending the following tool
http://tools.osherove.com/CoolTools/Regulator/tabid/185/Default.aspx

But i found the following regular expression tool more useful
http://www.sellsbrothers.com/tools/

--
Thanks & Regards,
Sundar Narasiman


Anon User said:
Hi,

I would like to validate a textbox control that should NOT contain some
specific characters such as "|, $,^".
how can I do it using RegularExpressionValidator, CompareValidator or maybe
CustomValidator.
I know how to use RegularExpressionValidator to validate MUST contain but I
couldn't figure out how the RegularExpression for NOT contain.

Try this

"\A([^\|\$|\^]*)\Z"
 

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

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top