SOLVED
Regex formula for string outside brackets
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Suhailpasha
5 - Atom
‎03-22-2022
07:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've multiple data columns containing data in given format below, need help with regex formula expression for formula tool using which I can select data before brackets
I know this can be achieved individually using regex or text to columns tools, but I want to process it in one go
eg:
input | Output |
Apple (1234) | Apple |
Barking Dog (2134) | Barking |
Grumpy Cat (981901) | Grumpy Cat |
Any help would be appreciated!.
Thanks in Advance.
Regards,
Suhail
Solved! Go to Solution.
Labels:
- Labels:
- Developer
- Expression
- Regex
3 REPLIES 3
20 - Arcturus
‎03-22-2022
07:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
a simple expression:
regex_replace([stuff], "(.*?)\s*\(.*", '$1')
cheers,
mark
regex101.com
Alteryx ACE & Top Community Contributor
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
‎03-22-2022
07:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It worked.
Thank you Mark!!
15 - Aurora
‎03-22-2022
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
