Matches a string against a pattern with wildcards and captures
The input string to match
The pattern string, may contain * and *+ wildcards
Optional
Optional custom character comparison function
Array of captures if matched, or null if not
match('foo bar', 'foo *') // returns ['bar']match('hello world', 'h*o w*d') // returns ['ell', 'orl']match('no match', 'different') // returns null Copy
match('foo bar', 'foo *') // returns ['bar']match('hello world', 'h*o w*d') // returns ['ell', 'orl']match('no match', 'different') // returns null
Matches a string against a pattern with wildcards and captures