Monthly Archives: December 2011

Check if an email is valid with PHP

if(preg_match('/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/', $email_to_test) && filter_var($email_to_test, FILTER_VALIDATE_EMAIL)) {
echo 'is valid!';
} else {
echo 'is invalid! =(';
}

Add all unversioned files to svn

Run this command on terminal

svn status | grep '?' | sed 's/^.* /svn add /' | bash

and after you can run this

svn commit -m 'Comments'
Page 1 of 11