In other words your program will be able to tell. It will either match fail or repeat as a whole. This assignment is implemented in the ruby parser.