Parentheses ( ) and pipe |
Stay organized with collections
Save and categorize content based on your preferences.
Parentheses ( )
Use parentheses to group parts of an expression together.
For example, if you need to match a set of characters that appear in a number of different product SKUs, then you can group those characters together in parentheses. In this scenario, you have a beach sandal that you sell for men and women, and your product SKUs look like this:
MNBS010212 (men's beach sandal, style 01, color 02, size 12)
WMBS020208 (women's beach sandal, style 02, color 02, size 08)
You could create the following regular expression to capture all beach-sandal SKUs:
\D+(BS)\d+
\D (non-numeric character)
+ (one or more times)
(BS) (character code for beach sandal)
\d (numeric character)
+ (one or more times)
Pipe |
Use the pipe to create an OR condition in an expression.
For example, here's a way to create an expression to match your beach-sandal SKUs:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-14 UTC."],[],[]]