With Pattern (regex) checked, Content Search uses regular expressions, the Python flavor. Here are patterns for common jobs.
| To find | Pattern |
|---|---|
| "13-month", "13 month", "13 months", or "thirteen-month" | \b(13|thirteen)[\s\-]?months?\b |
| Any US phone number | \(?\d{3}\)?[\s.\-]?\d{3}[\s.\-]\d{4} |
| One old phone number, however it's written | 801[\s.\-)]*555[\s.\-]*0142 |
| A product name with or without a hyphen or space | \bALTA[\s\-]?Gateway\b |
| Any year from 2015 to 2023 | \b20(1[5-9]|2[0-3])\b |
| A price | \$\d[\d,]*(\.\d{2})? |
| "Free shipping" anywhere near "over" | free shipping.{0,40}over |
The parts that do the work
\bmatches the edge of a word, so\b13won't match "113."[\s\-]?allows a space, a hyphen, or nothing.s?makes the letter before it optional ("month" or "months").(a|b)matches either one.\dis any digit;{3}means exactly three of the thing before it..{0,40}is up to 40 of any character.
Leave Match case off to ignore capitalization. Hyphens copied from Word or a PDF are sometimes a different character; add them to the brackets, like [\s\-\u2010\u2011\u2013].