Saturday, January 9, 2010

Regular Expressions

Regular Expressions are a way to describe a set of strings, in general terms, based on some common characteristics. It is supported by the java.util.regex package. This package primarily consists of three classes: Pattern, Matcher and PatternSyntaxException

Metacharacters
A metacharacter is a character with a special meaning interpreted by the matcher. Metacharacter are also used in Path class as Globs. ([{\^-$|]})?*+. this are the metacharacters supported by this package.

It is very interesting to use regular expressions in java programs. All the principles of Mathematical Sets such as Negation, Ranges, unions, Intersections etc are applied.

tutorials

No comments:

Post a Comment