Regular Expressions 101

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

"
(.*?)(?:\(#\d+\))?$
"
gm

Description
Created·2023-09-22 11:56
Type·Match
Flavor·Java

This regex expression is useful for extracting only the text string from a value in a column that may contain values from individual rows with repeat strings tagged with a suffix. For example - Row 1: "Sales (#1)", Row 2: "Sales Match (#2)". From the shared examples, this regex will extract the text "Sales" and "Sales Match."

Submitted by nilotpalc
Open Workspace