117
rated 0 times
[
122]
[
5]
/ answers: 1 / hits: 127072
/ 12 Years ago, wed, february 20, 2013, 12:00:00
I need to check whether a word starts with a particular substring ignoring the case differences. I have been doing this check using the following regex search pattern but that does not help when there is difference in case across the strings.
my case sensitive way:
var searchPattern = new RegExp('^' + query);
if (searchPattern.test(stringToCheck)) {}
More From » regex