background preloader

Regex

Facebook Twitter

Regular Expressions. Table of Contents Last updated - Mon Mar 7 20:22:51 EST 2011 - part of the Unix tutorials And then there's My blog Bruce Barnett Note that this was written in 1991, before Linux.

Regular Expressions

In the 1980's, it was common to have different sets of regular expression features with different features. ed(1) was different from sed(1) which was different from vi(1), etc. Note that Sun went through every utility and forced each one to use one of two distinct regular expression libraries - regular or extended. Using Regular Expressions in Java. Java 4 (JDK 1.4) and later have comprehensive support for regular expressions through the standard java.util.regex package.

Using Regular Expressions in Java

Because Java lacked a regex package for so long, there are also many 3rd party regex packages available for Java. I will only discuss Sun's regex library that is now part of the JDK. Its quality is excellent, better than most of the 3rd party packages. Unless you need to support older versions of the JDK, the java.util.regex package is the way to go. Java 5 fixes some bugs and adds support for Unicode blocks.

Regular Expressions and the Java Programming Language. Oracle Technology Network > Java Software Downloads View All Downloads Top Downloads New Downloads What's New.

Regular Expressions and the Java Programming Language