From this tutorial I learned about "Regular Expressions - Quantifiers", and based on this test code used in this tutorial.
Enter your regex: a??
Enter input string to search: a
I found the text "" starting at index 0 and ending at index 0.
I found the text "" starting at index 1 and ending at index 1.
And
Enter your regex: a??
Enter input string to search: aaa
I found the text "" starting at index 0 and ending at index 0.
I found the text "" starting at index 1 and ending at index 1.
I found the text "" starting at index 2 and ending at index 2.
I found the text "" starting at index 3 and ending at index 3.
Also
Enter your regex: a??
Enter input string to search: cab
I found the text "" starting at index 0 and ending at index 0.
I found the text "" starting at index 1 and ending at index 1.
I found the text "" starting at index 2 and ending at index 2.
I found the text "" starting at index 3 and ending at index 3.
Why?