stranger123
Programmer
Hi,
Want to test "abc" in s or not with case insensitive?
s.indexOf("abc")==-1 is case sensitive.
Want to test "abc" in s or not with case insensitive?
s.indexOf("abc")==-1 is case sensitive.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
msdocumentation said:test Method
Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
rgExp.test(str)
Arguments
rgExp
Required. An instance of a Regular Expression object containing the regular expression pattern and applicable flags.
str
Required. The string on which to perform the search.
Remarks
The test method checks to see if a pattern exists within a string and returns true if so, and false otherwise.