Question

How to identified non title case words in names?

  • 30 January 2020
  • 7 replies
  • 1 view

Badge

how to identify non title case words in the source indicate yellow color names

NameIdentificationVenkat RockVenkat RockWinner bufferWinner bufferLOck FuzzyLOck Fuzzylime roadlime roadFanTasy strEetFanTasy strEetVennila roaDVennila roaDRam NagarRam NagargAnga tempLegAnga tempLeSuri NagaSuri Naga

7 replies

Userlevel 2
Badge +19

This regular expression should do the trick:

^(?:[A-Z][^\\s]*\\s?)+$

You could also use the @FullTileCase() function in the Text Editor to convert all the strings to Title Case

Userlevel 5

Another solution is to convert the string to title case in a new attribute, then compare the result with the original value. If the values differ, then the input wasn't proper title case.

Badge

This regular expression should do the trick:

^(?:[A-Z][^\\s]*\\s?)+$

You could also use the @FullTileCase() function in the Text Editor to convert all the strings to Title Case

thanks for giving your answer I know that option but i asked the question only for identification purpose non title case words how it is possible please tell me

Userlevel 1
Badge +21

Use a tester to compare the original attribute to the attribute converted with Full Title Case (this doesn't change the original attributes in any way)

Userlevel 2
Badge +19

thanks for giving your answer I know that option but i asked the question only for identification purpose non title case words how it is possible please tell me

Sorry, I thought you wanted to change it. In that case, @ebygomm answer should work for you.
Userlevel 2
Badge +16

The AttributeValidator transformer has a test for CASE = Full Title Case

That allows you to validate the data.

StringSearcher transformer, with regular expression:

^([A-Z][a-z]*\s)+[A-Z][a-z]*$

Reply