If you want to escape them, you can. Of course, I am being hyper-literal here. You can download the Java RegEx Cheat Sheet, below. Just a little remark: curly braces actually have special meaning for regex engine (e.g. Matches the backspace (0x08) when inside the brackets. We do not need any 3rd party library to run regex against any string in Java. Making statements based on opinion; back them up with references or personal experience. Line Anchors. The Pattern.compile method takes a String, which is the RegEx that defines a set of matching strings. There is also an escape character, which is the backslash "\". Email validation and passwords are few areas of strings where Regex are widely used to define the constraints. \E: Ends quoting begun with \Q. Below is the list of the most frequently used methods in the Matcher class API: By compiling a pattern and obtaining a matcher for it, you can match many texts for the pattern efficiently. Curle braces have no special meaning here for regexp language, so they should not be escaped I think. Two digits repeated twice, \1 - refers to the matched group.