The power of the Regular expression on the web

Regular Expression are Swiss-knife tools developers should know, extremely useful for  web-purposes and unavoidable when dealing with content scraping.
A single call of a preg_match_all with a medium complex regular expression could save hundres of LOC and time as well as obtaining much more maintainable code.

There  are advanced features like subpatterns and conditional expressions. They might be useful to extract some patterns, task  otherwise not easily feasible.

Pattern Syntax guide – php.net

Useful links about regular expressions