regex

TwitterFacebook
Get flash to fully experience Pearltrees

Regular Expressions

http://www.grymoire.com/Unix/Regular.html Note that this was written in 1991, before Linux. 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 distict regular expression libraries - regular or extended. I wrote this tutorial for Sun users, and some of the commands discussed are now obsolete. On Linux and other UNIX systems, you might find out that some of these features are not implemented. Your milage may vary.

Using Regular Expressions in Java

http://www.regular-expressions.info/java.html Java 4 (JDK 1.4) and later have comprehensive support for regular expressions through the standard java.util.regex package. 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 and 6 use the same regular expression flavor (with a few minor fixes), and provide the same regular expression classes.
Applications frequently require text processing for features like word searches, email validation, or XML document integrity. This often involves pattern matching. Languages like Perl, sed, or awk improves pattern matching with the use of regular expressions, strings of characters that define patterns used to search for matching text. To pattern match using the Java programming language required the use of the StringTokenizer class with many charAt substring methods to read through the characters or tokens to process the text.

Regular Expressions and the Java Programming Language

http://java.sun.com/developer/technicalArticles/releases/1.4regex/