-
regex

Matcher start with parameter example
This is an example of how to use Matcher.start(int group) API method to get the start index of the subsequence…
Read More » -
regex

Back references example
In this example we shall show you how to use Matcher.replaceAll(String replacement) API method to replace every subsequence of an…
Read More » -
regex

Matcher groupCount example
In this example we shall show you how to use Matcher.groupCount() API method to get the number of capturing groups…
Read More » -
regex

Match address using regular expressions
This is an example of how to match an address using regular expressions. We have created a method boolean isValidAddr(String…
Read More » -
regex

Swing GUI application for regular expression testing
This is an example of how to create a Swing GUI application for regular expression testing. The application creates a…
Read More » -
regex

Pattern matcher example
In this example we shall show you how to use a Matcher and a Pattern in Java to match an…
Read More » -
regex

Split a string into an array by regular expressions
This is an example of how to split a string into an array by regular expressions. Splitting a string by regular…
Read More » -
regex

String.matches method example
With this example we shall show you how to use String.matches(String regex) API method to check if a given String…
Read More » -
regex

Remove line termination characters from string
In this example we shall show you how to remove line termination characters from a String, using regular expressions. To…
Read More » -
regex

Greedy and non-greedy Reg Ex matching
This is an example of how to use greedy and non-greedy regular expression matching. Greedy matching means that the expression will…
Read More »
