I have a regular expression.

"^.?$"

According to documentation "." is any character except \n
? is zero or one times preceding character.

string "a" matches.
"aa" does not match. Should "aa" match?
"ab" does not match. Should it match?

Can an guru explain me this please?


thx
gulumal