fix js syntax for regex