PHP Command Prompt Part II - Regular Expressions
Wednesday, March 12th, 2003How often has it happened that you have a few hundred pages, with something that needs to be changed on each page? Luckily, PHP >= 4.2.0 ships with PCRE enabled by default, opening up the power of regular expressions to PHP scripters.
I’m not going to give a primer on REs (Regular Expressions), but if you don’t know about them you should really sit right down & teach yourself. O’Reilly has an excellent book on them, and the program Visual REGEXP (search Freshmeat) is a great learning tool.
If you need help on running PHP from the command prompt, see my earlier post on the topic.
Here’s the setup:
(more…)