in reply to using ? and ?? in regex

? in a regex doesn't mean "one character". It's a modifier. You want "." instead. So ".." to find any two characters.

Regex syntax is not glob (filename wildcards) syntax.

-- Randal L. Schwartz, Perl hacker