abc* | matches a string that has ab followed by zero or more c's |
---|---|
abc+ | matches a string that has ab followed by one or more c's |
abc? | matches a string that has ab followed by zero or one c's |
abc2 | matches a string that has ab followed by cc |
abc{2,} | matches a string that has ab followed by 2 or more c's |
abc{2,5} | matches a string that has ab followed by 2 up to 5 c's |
a(bc)* | matches a string that has a followed by zero or more copies of the sequence bc's |
a(bc){2,5} | matches a string that has a followed by 2 up to 5 copies of the sequence bc's |