Handle anychar (.) correctly with bounded repeaat regex expression.