PHP/JavaScript Regular expressions made easy