djp1988 Posted August 23, 2008 Share Posted August 23, 2008 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 More sharing options...
Synook Posted August 23, 2008 Share Posted August 23, 2008 http://www.regular-expressions.info/ is a good resource. Link to comment Share on other sites More sharing options...
djp1988 Posted August 23, 2008 Author Share Posted August 23, 2008 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 More sharing options...
djp1988 Posted August 23, 2008 Author Share Posted August 23, 2008 ??? if (eregi ('^[[:alpha:]\.\' éèêëàáâäçîïìíùúûüôöóò\-]{1,15}$', stripslashes(trim($_GET['textfield'])))) {) ??? Link to comment Share on other sites More sharing options...
Synook Posted August 24, 2008 Share Posted August 24, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.