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 th
Pass the i modifier as second argument:
i
new RegExp('^' + query, 'i');
Have a look at the documentation for more information.