I want to do a string search inside a string. Simply saying MySTR.search(Needle).
MySTR.search(Needle)
The problem occurs when this needle string contains speci
needle
I'm just dipping my feet in Javascript, but is there a reason you need to use the regex engine at all? How about
var sNeedle = '*Stars!*'; var sMySTR = 'The contents of this string have no importance'; if ( sMySTR.indexOf(sNeedle) > -1 ) { //found it }