Beast Mode

Beast Mode

Count the number of upper case letters in a string

I am trying to determine if all letters in a field are capitalized. for example:

String| Count

ABC | 3

abc | 0

Abcd |1

How can I calculate the 'Count' in this example?

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answer

  • Answer ✓

    LENGTH(Uppercase) - LENGTH(REGEXP_REPLACE(Uppercase, '[A-Z]', ''))

    If I solved your problem, please select "yes" above

Answers

  • Answer ✓

    LENGTH(Uppercase) - LENGTH(REGEXP_REPLACE(Uppercase, '[A-Z]', ''))

    If I solved your problem, please select "yes" above

  • Coach
    edited October 2024

    I think you have to do this in an ETL, because REGEXP_REPLACE() doesn't work for me inside of a card.

    1. LENGTH(REGEXP_REPLACE(`sample`,'[^A-Z]',''))
    image.png
  • thanks all!! this was resolved; I used the formula in Data Flow.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In