<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5f290176-d74d-4847-824b-f173f3489a87/tfexplains-profile.jpg" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/5f290176-d74d-4847-824b-f173f3489a87/tfexplains-profile.jpg" width="40px" /> This page contains working examples for all supported alternation features in Notion regular expressions. Duplicate this page to your workspace if you’re unable to view the formulas.

Regular Expressions in Notion Formulas

Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter

</aside>

📚 References:


Character Escapes

Character Classes

Quantifiers

Anchors

Character Grouping

Substitutions

Backreferences

Alternation


Unicode Numbers in Regular Expressions


Regular Expression Examples


Notion Formula Examples


📜 Table of Contents:


| - either/or

replaceAll("jpg, jpeg, png, gif, wav", "jpg|jpeg|png|gif", "picture")
// Output: picture, picture, picture, picture, wav

// Order matters!

replace("mould", "ou|o", "😀")
// Output: m😀ld

replace("mould", "o|ou", "😀")
// Output: m😀uld

// Alternation can also be done inside groups:

replaceAll("My name is Bruce Wayne", "(Bruce|Wayne)", "*****")
// Output: My name is ***** *****

Test


© Thomas Frank