Mega Code Archive

 
Categories / Php / Strings
 

Brackets [] finds a range of characters

Regexp [php] finds any string containing the character p or h.  [0–9] matches any decimal digit from 0 through 9. [a–z] matches any character from lowercase a through lowercase z. [A–Z] matches any character from uppercase A through uppercase Z. [a–Z] matches any character from lowercase a through uppercase Z.