Answers for "string includes array in element"

0

js array string includes

if (new RegExp(substrings.join("|")).test(string)) {
    // At least one match
}
Posted by: Guest on July-15-2021
-1

check if string contains a value in array

$count = 0;
str_replace($owned_urls, '', $string, $count);
// if replace is successful means the array value is present(Match Found).
if ($count > 0) {
  echo "One of Array value is present in the string.";
}
Posted by: Guest on October-04-2021

Code answers related to "string includes array in element"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language