Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Regular expression problem...
Index -> Programming, PHP -> PHP Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Amailer




PostPosted: Fri Feb 04, 2005 11:28 am   Post subject: Regular expression problem...

Hey all,
Anyone know how to make it so that... the script uses regular expression to make sure the string only allows letters, numbers and hypens, nothign else.

Anyone know how to do that?
Thanks.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Feb 04, 2005 1:19 pm   Post subject: (No subject)

how do I use RegEx in PHP? (as in syntax to make scan/match/etc)
wtd




PostPosted: Fri Feb 04, 2005 2:36 pm   Post subject: (No subject)

http://ca3.php.net/manual-lookup.php?pattern=preg
Tony




PostPosted: Fri Feb 04, 2005 2:42 pm   Post subject: (No subject)

hmm... apparently it's
http://ca.php.net/manual/en/function.preg-match.php
wtd




PostPosted: Fri Feb 04, 2005 6:33 pm   Post subject: (No subject)

You've seen regular expressions in Ruby, so do your best not to be sick over how you have to interact with them in PHP. Smile
Tony




PostPosted: Sat Feb 05, 2005 5:16 pm   Post subject: (No subject)

haha, yes Laughing

Ruby's RegEx's is by far better
Display posts from previous:   
   Index -> Programming, PHP -> PHP Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: