Java Programming/Regular Expressions

The regular expressions (regex) are provided by the package.

Researches
The Pattern class offers the function matches which returns true if an expression is found into a string.

For example, this script returns the unknown word preceding a known word:

The Matcher class allows to get all matches for a given expression, with different methods:
 * 1) find: find the next result.
 * 2) group: displays the result.

For example, this script displays the HTML b tags contents: