Javascript SnippetsAboutAboutContact ↗Contact ↗ (opens in a new tab)
GitHubGitHub (opens in a new tab)
  • Introduction
  • Another Page
  • Array
    • Fill
    • Indexofall
  • Regexp
    • Indentstring
    • Isabsoluteurl
    • Isalpha
  • Key
    • Indexby
    • Indexon
  • Advanced (A Folder)
    • Satori
  • HTML
    • Insertafter
  • Object
    • Invertkeyvalues
    • Isarraylike
  • String
    • Isanagram
  • Introduction
  • Another Page
  • Array
    • Fill
    • Indexofall
  • Regexp
    • Indentstring
    • Isabsoluteurl
    • Isalpha
      • Example
  • Key
    • Indexby
    • Indexon
  • Advanced (A Folder)
    • Satori
  • About
  • Contact ↗ (opens in a new tab)
  • HTML
    • Insertafter
  • Object
    • Invertkeyvalues
    • Isarraylike
  • String
    • Isanagram

On This Page

  • Example
Question? Give us feedback → (opens in a new tab)Edit this page
Regexp
Isalpha

String is alpha

Checks if a string contains only alpha characters.

  • Use RegExp.prototype.test() to check if the given string matches against the alphabetic regexp pattern.
const isAlpha = str => /^[a-zA-Z]*$/.test(str);

Example

Last updated on February 13, 2023
IsabsoluteurlIndexby

Nextra Docs Template