matches
checks if a string matches a given regular expression pattern
(string subject, string pattern) -> boolean
Returns true
if given subject
in its entirety matches regular expression pattern
. Returns false
otherwise.
Returns nil
if any argument is nil
.
Parameters
Name | Type | Description |
---|---|---|
subject |
string | The string to match |
pattern |
string | The regular expression to match |