Regular expressions are generally not intuitive.

Regular expressions in PHP are especially not intuitive.

In short, there are some special rules to writing regular expressions using PHP.  Here are some differences:


// Traditional - no delimiters necessary

// PHP - use a pair of slashes (or other non-alpha/numerics)

Character Classes

// Traditional - braces

// PHP - square brackets

Find out all of the details on the PHP site right here: