Regex

JavaScript

  • Testing if matches: const isMatch = regex.test(string)
  • Getting match results: const results = string.match(regex)

Email

^[^@\s]+@[^@\s]+\.[A-Za-z]+$