Use indexOf instead of RegExp