the
trMatch
of
(
expression ,
pattern )
trMatch
(
expression ,
pattern )
Expression yields a string
. Pattern yields a string describing a set of characters.
The trMatch
function returns true
if and only if the specified expression consists solely of characters in the specified pattern.
Pattern describes a set of characters, not a string. A range of characters can be specified by putting a hyphen between two characters; to match a literal hyphen, put a hyphen at the beginning or end. For example, the following pattern matches all numbers and basic Latin letters, as well as hyphens: A-Za-z0-9-