SOLVED
Conditional RegEx
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
BonusCup
11 - Bolide
‎10-16-2020
07:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
I am relatively a novice to RegEx and I'm close to my desired results but I have some data similar to the table below where I'm having an issue.
field1 | field1_desired |
data 1 (abcd) | abcd |
data 2 (efg) | efg |
data 3 (afbc), data 4 (cgha) | afbc, cgha |
text 1 | text 1 |
text 2 | text 2 |
data 5 (ajdj) | ajdj |
Using this conditional statement below, the desired results are correct except for Row3: data 3 (afbc), data 4 (cgha)
Formula:
IF(Contains([field1], "data")) then
REGEX_Replace([field1], ".*?\((.*)\).*", '$1') else [field1] endif
Result for Row3:
afbc), data 4 (cgha
Solved! Go to Solution.
2 REPLIES 2
ACE Emeritus
‎10-16-2020
07:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎10-16-2020
07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
