By mkyong – November 18, 2009
Regular expression is an art of the programing, it’s hard to debug , learn and understand, but the powerful features are still attract many developers to code regular expression. Let’s explore the following 10 practical regular expression ~ enjoy 🙂
1. Username Regular Expression Pattern
^[a–z0–9_–]{3,15}$
^ # Start of the line
[a–z0–9_–] # Match characters and symbols in the list, a-z, 0-9 , underscore , hyphen
{3,15} # Length at least 3 characters and maximum length of 15
$ # End of the line Continue reading “10 Java Regular Expression Examples You Should Know”