regex
-
Validate Email Address with Java Regular Expression example
Email validation is a very frequent requirement in many applications. Basically the main policy that email format follows is that…
Read More » -
How To Validate Hex Color Code With Regular Expression
In this tutorial we are going to see how to create a simple application that validates Hexadecimal Color Codes. The…
Read More » -
Validate Password with Java Regular Expression example
In the previous tutorial on username validation we explained why input validation is important for your application’s security and data…
Read More » -
Validate Username with Java Regular Expression example
When you are writing an application that requires authentication, in most cases, the users should provide a username among other…
Read More » -
Simple validation example
In this example we shall show you how to make a simple validation of a String, using a Matcher against…
Read More » -
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 » -
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 » -
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 » -
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 » -
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 »