Top "String-matching" questions

String matching is the problem of finding occurrences of one string (“pattern”, “needle”) in another (“text”, “haystack”).

How to check whether a string contains a substring in JavaScript?

Usually I would expect a String.contains() method, but there doesn't seem to be one. What is a reasonable way …

javascript string substring string-matching
How do I check if a string contains a specific word?

Consider: $a = 'How are you?'; if ($a contains 'are') echo 'true'; Suppose I have the code above, what is …

php string substring contains string-matching
Check if string matches pattern

How do I check if a string matches this pattern? Uppercase letter, number(s), uppercase letter, number(s)... Example, These …

python regex string-matching
Check whether a string contains a substring

How can I check whether a given string contains a certain substring, using Perl? More specifically, I want to see …

string perl string-matching
PowerShell and the -contains operator

Consider the following snippet: "12-18" -Contains "-" You’d think this evaluates to true, but it doesn't. This will evaluate …

powershell operators string-matching
Regex allow a string to only contain numbers 0 - 9 and limit length to 45

I am trying to create a regex to have a string only contain 0-9 as the characters and it must …

regex string string-matching
Perl - If string contains text?

I want to use curl to view the source of a page and if that source contains a word that …

string perl string-matching
Filter multiple values on a string column in dplyr

I have a data.frame with character data in one of the columns. I would like to filter multiple options …

r dplyr string-matching multiple-conditions
Regular Expression Match to test for a valid year

Given a value I want to validate it to check if it is a valid year. My criteria is simple …

regex string validation string-matching
How to search a specific value in all tables (PostgreSQL)?

Is it possible to search every column of every table for a particular value in PostgreSQL? A similar question is …

postgresql grep string-matching