Fix regex check