Expand my Community achievements bar.

Capitalize letters, add exception.

Avatar

Level 1

Hello.

I use the script below to capitalize first letter on each word of text field.

this.rawValue = this.rawValue.toLowerCase().replace(/\b[a-z]/g, function replacer(match) { return  match.toUpperCase(); });

So, I would like to know how add exception words for example: "dos" and "das".

I've been looking for the answer in the Adobe forums but I couldn't find it.

Could someone help me or show the way?

Thank ou very much.

0 Replies