Skip to Content
-2

building a regular expression that makes every first letter in the new word capital.

Apr 10 at 12:05 PM

23

avatar image

Can anyone help me in building a regular expression that makes every first letter in the new word capital in SAP HANA.

for Example input : pRathamesh is Mad. hE is also stupid. output : Prathamesh Is Mad. He Is Also Stupid.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jürgen L
Apr 10 at 12:36 PM
0

Is this just for the sake of a ABAP training lesson?

How would you identify that it is a new word? Probably because it starts after a blank

And identifying the first letter should even be more easy.

And what is really the benefit if making words grammatically wrong?

Show 2 Share
10 |10000 characters needed characters left characters exceeded

It's an user requirement.

I want something like this :

Input : This this is mAngo.

Output : This This Is Mango.

I'm just giving you are vague example to make you understand my Requirement.

0
Prathamesh Hanamghar

I think I gave you already the verbal way how you can do it.

Is there any language in the world where every single word in a sentence has a capital first character?

If not then it is stupid requirement, even or because it is a user requirement. Not everything should be made just because a user wants it.

But maybe your way to ask is just... a bit challenging.. and you want something like a spell-checker with auto-correction.

1