Regular expressions pcre2 · Characters and anchors

Match the whole line

Anchor to the start and end of the text. This matches a phone number like 555-1234.

^\d{3}-\d{4}$

Official Regular expressions pcre2 documentation

More characters and anchors commands

All characters and anchors commands · Regular expressions pcre2 cheatsheet

Was this page helpful?