Please explain expected output


#1

for a** , a?? output is 1 but for a* , a ?? output is 0…pls explain


#2

Hi,
Can you provide both string and pattern?
And please note that a** is equal to a* (number of *'s doesnt make any difference)