By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

PHP Regular Expressions Tutorial

Brugbarts tutorial on regular expressions in PHP.

Edited: 2012-06-06 14:04

Regular expressions can be useful when validating user-input, matching and replacing content. While this tutorial is aimed towards PHP, some of the patterns used in examples, may also work with other languages.

Tutorials

  1. Validate e-mails with regular expressions – A Tutorial on email validation in PHP
  2. Block non-latin characters with PHP – How to block characters specific to languages that you do not understand anyway.

Articles

  1. About white space in web design – How to handle linebreaks, tabs, and spaces.