
-----------------------------------
Amailer
Fri Feb 04, 2005 11:28 am

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.

-----------------------------------
Tony
Fri Feb 04, 2005 1:19 pm


-----------------------------------
how do I use RegEx in PHP? (as in syntax to make scan/match/etc)

-----------------------------------
wtd
Fri Feb 04, 2005 2:36 pm


-----------------------------------
http://ca3.php.net/manual-lookup.php?pattern=preg

-----------------------------------
Tony
Fri Feb 04, 2005 2:42 pm


-----------------------------------
hmm... apparently it's
http://ca.php.net/manual/en/function.preg-match.php

-----------------------------------
wtd
Fri Feb 04, 2005 6:33 pm


-----------------------------------
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.  :)

-----------------------------------
Tony
Sat Feb 05, 2005 5:16 pm


-----------------------------------
haha, yes :lol: 

Ruby's RegEx's is by far better
