Jump to content

Archived

This topic is now archived and is closed to further replies.

philo23

REGEXP's need help writing one

Recommended Posts

i need to:
[b]check my users registering username[/b]
also
[b]check to see if this string, '../' is found[/b]

any ideas. i'd like my usernames to contain only "_A-Z a-z 0-1" only
thanks in advance

Share this post


Link to post
Share on other sites
This should work [code]if(!eregi("[a-z0-1_]",$username)) echo "Invalid";[/code] [a href=\"http://www.regularexpressions.info/\" target=\"_blank\"]Click here for a good regular expressions information source.[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.