Regular Expressions

Regular Expressions are the unsung heroes of programming. They can find anything you want, from the most elusive email to the most elusive typo.

But be careful, they can also drive you mad with their endless backslashes and starry-eyed gazelles!

Learn more about Regular Expressions Get your regex tools here!

This is a regular expression:

/^\s*([A-Za-z0-9]+)\s*$/

What does it do?

This regular expression is a bit of a weirdo. It matches strings that start with one or more alphanumeric characters followed by any number of whitespace characters.