Top "String-matching" questions

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

Wildcard string matching in Ruby

I'd like to write a utility function/module that'll provide simple wildcard/glob matching to strings. The reason I'm not …

ruby pattern-matching glob string-matching
Finding how similar two strings are

I'm looking for an algorithm that takes 2 strings and will give me back a "factor of similarity". Basically, I will …

algorithm string-matching
strstr faster than algorithms?

I have a file that's 21056 bytes. I've written a program in C that reads the entire file into a buffer, …

c performance algorithm string-matching strstr
How to find the longest substring containing two unique repeating characters

The task is to find the longest substring in a given string that is composed of any two unique repeating …

java string-matching
Regex for existence of some words whose order doesn't matter

I would like to write a regex for searching for the existence of some words, but their order of appearance …

python regex string string-matching regex-lookarounds
String matching objective-c

I need to match my string in this way: *myString* where * mean any substring. which method should I use? can …

iphone objective-c string string-matching
How to subset data with advance string matching

I have the following data frame from which I would like to extract rows based on matching strings. > GEMA_…

r string-matching subset
Damerau–Levenshtein distance (Edit Distance with Transposition) c implementation

I implemented the Damerau–Levenshtein distance in c++ but it does not give correct o/p for the input (pantera,…

c++ string string-matching levenshtein-distance
Check if a string is a possible abbrevation for a name

I'm trying to develop a python algorithm to check if a string could be an abbrevation for another word. For …

python string-matching slug abbreviation text-analysis
String similarity in PHP: levenshtein like function for long strings

The function levenshtein in PHP works on strings with maximum length 255. What are good alternatives to compute a similarity score …

php string-matching similarity