Project Advice

Project Advice

3. Regular expressions

3.5 Summary

This is a very brief summary, but the only way to learn regular expression is to try them out. Start with simple find expressions in a short piece of text and work your way up to more complex things.

If you have routine changes that you want to make across a number of files you may want to investigate saving a number of regular expressions in a script. Using a scripting language, such as Perl, will allow you to run a series of regular expressions efficiently across multiple files.

If you want to go into the subtleties of regular expressions, the undisputed champion of books on the topic is Mastering Regular Expressions by Jeffrey Friedl.