Fixed using regex helper in indexOf