-
regex
Find occurances of a letter in a string
In this example we shall show you how to find occurances of a specific letter in a String. To find…
Read More » -
regex
Split a string by regular expression
This is an example of how to split a String using regular expression. Splitting a String with a regular expression…
Read More » -
regex
Word frequency count example
With this example we are going to demonstrate how to count the frequency of words in a file. In short,…
Read More » -
regex
Simple string tokenizer
In this example we shall show you how to use a simple StringTokenizer. The string tokenizer class allows an application…
Read More » -
regex
Filter the content of a file using regular expressions
This is an example of how to filter the content of a file using regular expressions. Filtering the content of…
Read More » -
regex
Line ending matching example
With this example we are going to demonstrate how to check a line ending matching. We are using Patterns and…
Read More » -
regex
Matcher replaceAll – Part 2
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 replaceFirst example
This is an example of how to use Matcher.replaceFirst(String replacement) API method to replace the first subsequence of an input…
Read More » -
regex
Matcher lookingAt example
With this example we are going to demonstrate how to use Matcher.lookingAt() API method to match an input sequence, starting…
Read More » -
regex
Matcher end with parameter example
In this example we shall show you how to use Matcher.end(int group) API method to get the offset after the last…
Read More »