Skip to main content
Solved

Regular Expression for Uppercase Only

  • October 24, 2019
  • 6 replies
  • 353 views

deanhowell
Influencer
Forum|alt.badge.img+24

I am trying to set up a tester or string searcher transformer to test if the entire string is uppercase but can't get it to work.

 

THIS SHOULD PASS

but

This Should FAIL

Best answer by danullen

If it finds [a-z] it's a fail. As simple as that? :)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

Forum|alt.badge.img
  • 104 replies
  • Best Answer
  • October 24, 2019

If it finds [a-z] it's a fail. As simple as that? :)


takashi
Celebrity
  • 7843 replies
  • October 24, 2019

This setting could work as expected.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 24, 2019

I'd be tempted to ignore regex and do the test like this, if it's a possibility you'll have apostrophes, hyphens or similar in your input

e.g. THIS SHOULDN'T FAIL

But this should work as well - only values without any lowercase letters pass


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • 315 replies
  • October 24, 2019

If it finds [a-z] it's a fail. As simple as that? :)

Thanks @danullen, that worked perfectly, keeping it simple :)


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • 315 replies
  • October 24, 2019

I'd be tempted to ignore regex and do the test like this, if it's a possibility you'll have apostrophes, hyphens or similar in your input

e.g. THIS SHOULDN'T FAIL

But this should work as well - only values without any lowercase letters pass

Thanks also @ebygomm, that is a much more elegant solution. I love that there are multiple ways to get the same solution.


deanhowell
Influencer
Forum|alt.badge.img+24
  • Author
  • Influencer
  • 315 replies
  • October 24, 2019

This setting could work as expected.

Thanks @takashi, as always you are a terrific help. I am always impressed by the help provided by the members on this forum.