http://qs1969.pair.com?node_id=11136490


in reply to Problem with regex wildcard operator (.)...?

Your misunderstanding has nothing to do with the metacharacter '.', but rather with the quantifier '?'. When a character (or metacharacter) in your regex matches zero times, you will reach the end of the regex before you have matched all the characters in the string. Your 'end-of-string' anchor '$' fails.
Bill
  • Comment on Re: Problem with regex wildcard operator (.)...?