About 51 results
Open links in new tab
  1. How to check whether a string contains a substring in JavaScript ...

    Nov 24, 2009 · Usually I would expect a String.contains() method, but there doesn't seem to be one. What is a reasonable way to check for this?

  2. javascript - Check if a string has a certain piece of text - Stack Overflow

    Possible Duplicates: Check if text is in a string JavaScript: string contains I'm trying to check if a string I import into my application has a certain piece of text. I know how to do this w...

  3. javascript - How do I check if string contains substring ... - Stack ...

    1168 This question already has answers here: How to check whether a string contains a substring in JavaScript? (3 answers)

  4. How to check if a string contains text from an array of substrings in ...

    Apr 7, 2011 · Pretty straight forward. In javascript, I need to check if a string contains any substrings held in an array.

  5. How to tell if a string contains a certain character in JavaScript?

    16 ES6 contains inbuilt method (includes) in String's prototype, which can be used to check if string contains another string or not.

  6. Fastest way to check a string contain another substring in JavaScript?

    Jul 23, 2017 · If you want to search for a string contained in a variable inside another string variable, indexOf is the fastest because you'd need to create a RegExp object and process the string to …

  7. How to check if a string contains specific words in javascript

    Oct 20, 2020 · How to check if a string contains specific words in javascript Asked 5 years, 3 months ago Modified 4 months ago Viewed 7k times

  8. javascript - How to check if a string contain specific words? - Stack ...

    6 In javascript the includes () method can be used to determines whether a string contains particular word (or characters at specified position). Its case sensitive.

  9. Check whether a string matches a regex in JS - Stack Overflow

    I want to use JavaScript (I can also use jQuery) to do check whether a string matches the regex ^([a-z0-9]{5,})$, and get a true or false result. match() seems to check whether part of a string matches a …

  10. How can I test if a letter in a string is uppercase or lowercase using ...

    Jun 22, 2009 · If it is equal to the length of the string, that means all the letters passed the regex test, which means the string is uppercase. If not, the string is lowercase.