Skip to main content
Question

How to detect if a left-bracket occurs in a string?

  • February 2, 2026
  • 3 replies
  • 40 views

nicholas
Contributor
Forum|alt.badge.img+14

Hello all,

I want to build a Tester that detects if an attribute value has a left-bracket in the string

For example;

ASCOT (TOOWOOMBA REGIONAL)

Would be detected, because it has brackets surrounding TOOWOOMBA REGIONAL

I then want to extract just ASCOT and throw away that part of the string in brackets

 

3 replies

max_h
Enthusiast
Forum|alt.badge.img+23
  • Enthusiast
  • February 2, 2026

There are many ways to do this, for example you can simply use a StringReplacer:
 

This deletes all brackets and their content of chosen attribute.

If you want to specifically know which have a bracket, just put a ‘Tester’ up and use 
 

(left value is your attribute)

And afterwards you can use the StringReplacer or go with AttributeSplitter

Hope this helps!


redgeographics
Celebrity
Forum|alt.badge.img+62

If there’s only a single occurrence of text between brackets possible, a StringReplacer with the regular expression

\s\(.+\)

would do the trick (and remove the space before the first bracket too)

 

Ah, ​@max_h beat me to it  


nicholas
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • February 2, 2026

Thanks, those are both great answers!