About Regular Expressions

Since you are interested in Graphrex you probably already know about regular expressions, aka regex or regexp or RE.  Like many people, including experienced programmers, you may find regular expressions difficult to deal with. We hope that you will find Graphrex helpful. In particular, the graphical  visualizations that Graphrex creates should help you to understand and document the regular expression you are working with.

If you are not already familiar with regular expressions, read on.

The Role of Regular Expressions

Regular expressions were first developed in the late ’60’s and early ’70s as a way to scan for patterns in text. They were used in the Unix operating system, for example in the grep tool. Today, most computer languages support a version of regular expressions. You can also find yourself using them in the find/replace function of editors,  in Ant, and many other tools.  Despite their long history, regular expressions are still the most popular technology when it comes to scanning for patterns in text.

Learning about Regular Expressions

Among the many websites with tutorials and reference information  about regular expressions are the following:

  • Regular-Expressions.info has a useful quick start page, as well as a longer tutorial and a reference section.
  • The Regular Expressions Library is especially useful because it has some real-world examples of complex regular expressions.
  • The Javadoc for the Pattern class has a compact summary of the whole regular expressions language supported by Java.

A reference work with comprehensive coverage of regular expressions, how they work, and the many variations in their syntax in different programming languages is Mastering Regular Expressions, by Jeffry Friedl.