PHP strip certain tags with strip_tags
You cannot strip a certain list of tags with PHP’s strip_tags() function, you can only strip ‘all but’ tags. So…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
You cannot strip a certain list of tags with PHP’s strip_tags() function, you can only strip ‘all but’ tags. So…
ThisĀ horrendousĀ regular expression will parse a string and return a valid email address from it. $email = "<'Freddy'> fred@live.com"; preg_match('/[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/', $email,…
I’ve found an excellent online tool, where you can give it a regex, and it will spit out the PHP…
Say you have a list of movie titles, and you want to either sort them, or search through them, and…
Removing letters from a string using Regular Expressions. Very simple. but brain bending – All I wanted to do was…
Regular expressions — everyone loves them, right? Well, I am currently running Ubuntu, and I would normally use RegexBuddy –…