Use regex instead of matching string directly.