PHP: Validate email address format using RegEx.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Email addresses are used for pretty much everything. Registrations, usernames, lead generation… Everything. They are as unique as a telephone number or physical address and require validation just like any other piece of data. I’ve come across a lot of poorly written email validation scripts, but this one has risen from the ashes in a [...]

 

PHP: Auto-hyperlink URLs using RegEx.

Posted on January 9, 2012 by Jimmy K. in Tutorials.

Have you ever typed a URL into an email or website and a clickable hyperlink was automagically created? Regular expressions, baby! Check it out: This function accepts three arguments; $sInput, $sTarget (optional), and $sClassName (optional). $sInput is the text you would like to search and create hyperlinks for, $sTarget is the target window that hyperlinks [...]