Regex Question

M

mavrick_101

Hi,

I'm trying to validate user input for a text field.

I do not want them to enter special characters like <, > ! @ etc.

How can I do that using Regex.

Thnx for your help.
 
G

Guest

Hi,

I'm trying to validate user input for a text field.

I do not want them to enter special characters like <, > ! @ etc.

How can I do that using Regex.

Thnx for your help.

Use this

^\w*$

This would allow only 0..9 and a..zA..Z (\*)

^ means beginning of the word, $ - end
 

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,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top