Alphabetic Regex in HTML5

html, javascript, regex

Solution

Some nice examples: http://html5pattern.com/

In your case I would use:

[a-zA-Z]+

Problem

I'm really new to regex but I need to find a way to add a filter to a HTML5 form: ``` <input type="text" required="true" name="firstname" pattern="WHAT DO I PUT HERE"> ``` Could anyone help me with what to put in the pattern attribute, for example Accepted: - `John` - `Frank` Not accepted: - `Ke$ha` - `B0B` (Only alphabetic characters are accepted.)

Original source