bug(patch): Improve regex  matching