Thursday, 12 March 2009

#, in php regular expression

In PHP's patterns, you always start with a delimiter (the first character in the pattern) and end with the same. Then follow it with any modifiers. These all work the same:


/[a-z]/i
#[a-z]#i
%[a-z]%i

No comments:

My photo
London, United Kingdom
twitter.com/zhengxin

Facebook & Twitter