As proposal:
Check the character before * if it’s another common regular expression character and in this case not substitute it. The outcome of abc.*xyz
is different to abc..*xyz
from an regular expression point. This, I think, is not intuitive at all.