Patlamaz. Sadece daha komplike bir regex yazmanız gerekir. Regex'te conditions konusunu araştırın.
https://www.regular-expressions.info/conditional.html
https://stackoverflow.com/questions/...h-if-condition
https://www.rexegg.com/regex-conditionals.html