Evaluate my regex pleeze?
View Single Post
05-05-2008, 12:27 AM
Join Date: Apr 2007
My initial paragraph was aimed at delayedinsanity, which I assumed was clear from the response. Oops!
The tildes are acceptable delimiters for the PCRE extension (
functions -- which should be used rather than the
functions), the more usual delimiter (a character which signifies the start and end of the pattern) is the forward slash (e.g.
modifier means that (to quote the
a dollar metacharacter in the pattern matches only at the end of the subject string. Without this modifier, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines).
Practically speaking, if we have a string which ends in a newline character
would be successful whereas
would not match because the 'c' character isn't the absolute final character in the string.
Fuller information can be found in the PHP manual's
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe