Skip to content

matches

Category: String

Returns true if the input string matches the specified regular expression

  • Return type: boolean
  • Parameters:
    • regex string — Regular expression pattern
'hello@example.com'.matches('[a-z]+@[a-z]+\.[a-z]+')
Patient.telecom.value.matches('^\+1-[0-9]{3}-[0-9]{3}-[0-9]{4}$')