

The square brackets match any one of characters inside the brackets. If m is not present then the pattern is matched n or more times.įor example, "/x/" matches "xx" and "xxx". This form of the curly brackets is used to match the preceding character or pattern from n to m times, with n greater than m. Note: The curly brackets are used in the application to differentiate white space bounded text or characters from text or characters that are embedded among other characters with no identifiable white space. The curly brackets are used to match exactly n instances of the proceeding character or pattern. The question mark character matches the preceding pattern or character zero or once.įor example, "/ca?r/" matches both "car" and "cr" it will not match "caar".
#Curly brackets regex plus#
The plus sign matches the preceding pattern or character one or more times.įor example, /ca+r/ matches the following text fragments: "car", "caar" and "caaar", but will not match "cr". The asterisk matches the preceding pattern or character zero or more times.įor example, "/fo*/" matches the following text fragments:Ĭombining the period and asterisk, "/a.*b/" will match "a5b", "a55b", "a123b", and so on.

The dot character matches any single character.įor example, the terminology rule regular expression, "/a.b/", matches all text where there is an "a" followed by any single character, followed by a "b", as in, "a5b".
