regular expression letter followed by number. Here is the table listing down all the regular expression metacharacter syntax available in PowerShell. They can be used to search, edit, or manipulate text and data. regex to allow only numbers letters and hyphen. The and anchors ensure that the regex matches the entire subject string otherwise, it could match 10 characters within longer text. A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. A character class can set up the allowed range of characters. Javascript answers related to regex match only letters and numbers. With alphanumeric regex at our disposal, the solution is dead simple. I encourage you to print the tables so you have a cheat sheet on your desk for quick reference. (It you want a bookmark, here's a direct link to the regex reference tables ). While reading the rest of the site, when in doubt, you can always come back and look here. Alphanumeric characters are all alphabets and numbers i.e. The tables below are a reference to basic regex. We can use the given regular expression used to validate user input in such a way that it allows only alphanumeric characters.