Regex Match only a Word or Words in ALL CAPS and nothing else
- 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
Help. My input is Field1. I want to match words in ALL CAPS. There can be 1-N words. I want to ignore lines that might start with an ALL CAPS word or words but that contain other text.
I tried the following expression. It works, but there is an anomaly. It captures { -- when it should not. How can I fix this?
if REGEX_Match([Field1], Uppercase([Field1]),0) then [Field1] else '' endif
Example below. Note { ends up in New when it should not.
Field1 | New |
var addthis_config = { | |
data_use_flash: false, | |
} | } |
BIKESExcepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.ices in support o... | |
SPECIALIZED | SPECIALIZED |
ROUBAIX PRO | ROUBAIX PRO |
SWIM BIKE RUN | SWIM BIKE RUN |
Solved! Go to Solution.
- Labels:
- Expression
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Try using this Regular Expression in your Formula Tool 🙂
"^([A-Z\s]*)"
This expression essentially means, "If the string starts with a capital A-Z, only has capital letters A-Z following it, and has a white space following after, then create a match.".
I've attached my proposed solution to this comment. Please let me know if you need any more help or assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@hellyars
Thanks for the mark!👍
