Aron Pilhofer's blog

Regex: Search and replace on steroids

Of all the tools and techniques that have been brought to bear on the pursuit of computer-assisted reporting, few have been more useful, I've found, than regular expressions. Regexes are among the tools I find myself using on an almost daily basis.

Although there is a learning curve to be sure, I believe it is worth it. Once you learn the basics of regular expressions, you'll view the hours spent constructing elaborate string functions or embedded if/then statements as quite literally time wasted.

Advertise in Uplink

IRE logo

The National Institute for Computer-Assisted Reporting is a joint program of
Investigative Reporters and Editors, Inc., and the Missouri School of Journalism.

141 Neff Annex, Missouri School of Journalism, Columbia MO, 65211, Tel. 573-882-2042, Fax 573-884-5544

All Rights Reserved