-
regex
Find duplication in strings example
With this example we are going to demonstrate how to find duplication in Strings. In order to check if there…
Read More » -
regex
Determine if a string matches a pattern exactly
This is an example of how to determine if a String matches to a Pattern exactly. Using a Matcher to…
Read More » -
regex
Matcher.appendReplacement example – Part 2
In this example we shall show you how to use Matcher.appendReplacement(StringBuffer sb, String replacement) API method to append to a…
Read More » -
regex
Strip extra spaces in a string
With this example we are going to demonstrate how to strip extra spaces in a String. In short, to strip…
Read More » -
regex
Simple positive Lookbehind
This is an example of a simple positive look behind. Positive look behind methods assert the existence of a pattern…
Read More » -
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
Get all digits from a string
With this example we are going to demonstrate how to get all digits from a String, using a regular expression.…
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
Parse an Apache logfile with regular expressions
In this example we shall show you how to parse an Apache logfile with regular expressions. To parse an Apache…
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 »