Simplify indexOf to Regex