Fuzzy Match

Conducts a fuzzy search to find a pattern within the input based on weighted criteria.

Input: TextResult: HTML with a sandboxed preview

Text input

Tool options
Increase the score for adjacent matches.
Increase the score when a match follows a separator.
Increase the score for an uppercase match preceded by a lowercase letter.
Increase the score when the first character matches.
Subtract this score for each character before the first match.
Limit the total penalty for characters before the first match.

Examples

Highlighted characters form the query in order; intervening characters stay visible.

Find UploadButton using its initials

Input

src/UploadButton.tsx

Expected answer

src/<span class="hl1"><b>U</b>pload<b>B</b></span>utton.tsx
Search
ub
Sequential bonus
15
Separator bonus
30
Camel bonus
30
First letter bonus
15
Leading letter penalty
-5
Max leading letter penalty
-15
Unmatched letter penalty
-1
Jump to npm audit with a sparse abbreviation

Input

npm audit

Expected answer

<span class="hl1"><b>n</b>pm <b>a</b>u<b>d</b></span>it
Search
nad
Sequential bonus
15
Separator bonus
30
Camel bonus
30
First letter bonus
15
Leading letter penalty
-5
Max leading letter penalty
-15
Unmatched letter penalty
-1
Find an RFC file without typing its number

Input

rfc9110.html

Expected answer

<span class="hl1"><b>rfc</b>9110.<b>html</b></span>
Search
rfchtml
Sequential bonus
15
Separator bonus
30
Camel bonus
30
First letter bonus
15
Leading letter penalty
-5
Max leading letter penalty
-15
Unmatched letter penalty
-1
Match a snake_case field by its initials

Input

first_name

Expected answer

<span class="hl1"><b>f</b>irst_<b>n</b></span>ame
Search
fn
Sequential bonus
15
Separator bonus
30
Camel bonus
30
First letter bonus
15
Leading letter penalty
-5
Max leading letter penalty
-15
Unmatched letter penalty
-1
Reject a search whose letters are absent

Input

café

Expected answer

No matches.
Search
xyz
Sequential bonus
15
Separator bonus
30
Camel bonus
30
First letter bonus
15
Leading letter penalty
-5
Max leading letter penalty
-15
Unmatched letter penalty
-1

e.g. A search for dpan will match on Don't Panic

Format reference: Fuzzy Match background and specification

Parameters

ParameterDefault valueInput and choices
Search""Escape sequences such as \n, \r and \t are supported
Sequential bonus15Increase the score for adjacent matches.
Separator bonus30Increase the score when a match follows a separator.
Camel bonus30Increase the score for an uppercase match preceded by a lowercase letter.
First letter bonus15Increase the score when the first character matches.
Leading letter penalty-5Subtract this score for each character before the first match.
Max leading letter penalty-15Limit the total penalty for characters before the first match.
Unmatched letter penalty-1Number

Related tools

Browse utils tools