Skip to content

Glossary: JavaScript Beyond the Basics

Regular expression

Also written: regex, RegExp

A pattern for matching text. `/^\d{5}$/` means start, exactly five digits, end, and its `test` method says whether a string matches.

Where the book teaches it

Related terms

Guard clause