Jump to content

eregi pattern arguments


djp1988
 Share

Recommended Posts

Is there a guide on what you can use in the patter, im thinking of the code: (' ^ [[:alpha:]\.\' \-] {2,15} $ ', $string)i need some explainations on that first argument, I know what the point of it is but how can I make sense of the code and what all the valid arguments so I can make my own soup so to speak !

Link to comment
Share on other sites

hmm complicated I find learning this syntax, i have the following at the moment, but i want to allow accents such as é à è :

	if (eregi ('^[[:alpha:]\.\' \-]{1,15}$', stripslashes(trim($_GET['textfield'])))) {}

Link to comment
Share on other sites

That will do if necessary. I don't think there is a shortcut to represent alphanumeric + accented characters.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...