Quote:
Originally Posted by ElMiko
Another related question, when you have more than 9 parenthetically isolated expressions, how do you refer to the ones from 10 onward?
|
There doesn't seem to be any mention of this limit in the relevant Qt documentation, however most regex implementations work as you would expect. In this case, I would suggest removing capturing groups that you are not using, by making them into non-capturing groups.
Code:
Capturing : (Capture( the (third) word)) // The word 'third' is group 3
Non-capturing : (?:Capture(?: the (third) word)) // The word 'third' is group 1
Non-capturing groups work exactly like normal groups, except that they are not returned.