SyntaxFix
Write A Post
Hire A Developer
Questions
For finding a simple string, using the indexOf() method and using regex is pretty much the same: http://jsperf.com/substring - so choose which ever one that seems easier to write.