Changed the solution to use indexOf

Changed the solution to use indexOf witch is faster than regexp