PC Nerd Posted December 31, 2007 Share Posted December 31, 2007 Hi, Im writing scripts that validate user input - and Ive been told that regular expressions are by far the best way to go. the problem is that I dont understand how to format the string to validate with. ie ereg("validation string", $var); Im wondeirng if anyone here has a good tutorial that will explain how to construict one of these strings so that I can validate different data sets. Im particularly interested in text/date formats and emails etc. Thanks for any and all help in advance Quote Link to comment Share on other sites More sharing options...
aosmith Posted December 31, 2007 Share Posted December 31, 2007 have a look here: http://www.phpfreaks.com/phpref/42.php Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted December 31, 2007 Author Share Posted December 31, 2007 Thanks I understand the basics - but i dont understand how to construct the 3{z} stuff . is ther elike a list or table that says what to do? Thanks for oyu help Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted December 31, 2007 Share Posted December 31, 2007 Have a look at the stickys in the Regex Forum most importantly the one marked common expressions. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted December 31, 2007 Author Share Posted December 31, 2007 Thanks - thats got it Thansk for all your help - Happy New Year :> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.