Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!

String.match

match(regexPattern)

Description

Apply a regex pattern match.

'123 456'.match(r'(\d+)');
//= ['123']

'abc 123'.match(r'(xyz)');
//= []

'Abc'.match(r'abc'.flags('i'));
//= ['Abc']

See Also