the best of the regex

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

the best of the regex

Post by shiznatix »

is there a regex to detect if a user has inputted characters unsafe for mysql querys? instead of just doing mysql_real_escape_string i want to return the user to the page saying invalid characters were detected blah blah blah.

oh by the way, amazing idea to add this form! will definatly come in handy!
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

Not the best of coding, but they work

http://www.owasp.org/software/labs/phpfilters.html
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

many thanks! now if you guys now a tutorial to teach someone regex who knows absolutly nothing about regex :oops: that would be a awesome link
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I'll make a nice tutorial.... gimme some time and I'll make it "dead simple" ;-)
Post Reply