Added global modifier for regex check