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. 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.

  3. 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...

  4. 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)

  5. 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.

  6. 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 3 months ago Viewed 7k times

  7. 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.

  8. 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 …

  9. Determine if string is in list in JavaScript - Stack Overflow

    Mar 12, 2010 · However, it is a far superior solution to String.prototype.isInList = function() { ... } because using simple assignment like that will create an enumerable property on String.prototype, which is …

  10. 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 …