matchesWhole
Test if a string matches a pattern completely (entire string must match, not just a substring). Equivalent to anchoring with ^...$.
string(required): the string to testpattern(required): regular expression pattern
utlx
{
full: matchesWhole("abc123", "[a-z]+[0-9]+"), // true (whole string matches)
partial: matchesWhole("abc123xyz", "[a-z]+[0-9]+") // false (trailing "xyz" prevents full match)
}