RegEx replace ALL CAPS words of string
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Quite new to regex and I'm having a hard time wrapping my head around something I thought to be quite straight forward.
I have a set of strings consisting of a mix of words. I want to remove all words that are ALL uppercase, while saving all words with first letter uppercase (Proper) as well as all lowercase words.
E.g.
Input
"Car BLUE FAST EXPENSIVE"
"BLUE SLOW Railroad car CHEAP"
Output:
"Car"
"Railroad car"
Would be very grateful for any help with this!
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Yamariot
RegEx can get a little funny with case sensitive strings like this. My approach would be to split the data to rows, then use a Regex Match filter, and finally concatenate the results back again.
See attached workflow.
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Yamariot
Try with RegEx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! This worked perfectly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! This worked but went with the other suggestion as it made the flow a bit cleaner. But really appreciate your help with this!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm sorry that I'm late to the party.
REGEX_Replace([Field1], "\b\u+\b", '',0)
It looks for only letters that are continuous within a word boundary. It doesn't convert data to rows or require additional data cleanup to remove spaces. I like it.
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MarqueeCrew This is the cleanest answer! I was trying to figure out something similar, but didn't think about using a word boundary. 👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Phil!
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
