Community Patterns

Community Library Entry

1

Regular Expression
Created·2023-09-22 11:56
Flavor·Java

"
(.*?)(?:\(#\d+\))?$
"
gm
Open regex in editor

Description

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