Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

10 Examples of Java Regular Expression Special or Meta Characters

10 Examples Of Java Regular Expression Special Or Meta Characters
Hello guys, If you want to learn Regular Expression better in Java, you must remember meaning of all the special characters. They are the one, which makes a regular expression complex, but if you know and understand them then you can easily understand at least 50% of regular expression you encountered in Java applications. They are also known as reserved characters. In a regular expression, a character denotes itself unless it is one of the special character. For example, regular expression "a" will match letter "a" and return true, if input is "a" and false otherwise, but "a*" will not match input "a*", instead it will match any input which contains just e.g. "a", "aaa", or "aaaa". It will also match with empty String because * means zero or more times, so a* means "a" appearing zero or more times, as shown below:


This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here

Share the post

10 Examples of Java Regular Expression Special or Meta Characters

×

Subscribe to Javarevisited: Blog About Java Programmin

Get updates delivered right to your inbox!

Thank you for your subscription

×