Fix not to regex match no to use global var