120
Views
3
Comments
Solved
Find the count of alphabets, digits and special characters

HI 

I must get the count of alphabets, digits, and special characters I entered in the Input field. 


Ex: Outsystems@123$

Output :

Char: 10 

Numbers : 3 

Special characters  2


Thx

UserImage.jpg
Kay Lun
Solution

Hi Praveen,

Like PZ suggested, using the regex function could help to replace the character in a string that you don't want, after that, count the length of the result could give you what you need.

I uploaded the oml file FYR

Hope this help.

CountString.oml
2023-04-06 11-24-23
Paulo Zacarias

Hi Praveen, 

Just one idea on how you can accomplish that: use the regex function to identify each type, then add some logic to count the number of chars for each type.

Regards, 

PZ

UserImage.jpg
Praveen Tumati

Thx for early replay .Paulo Zacarias


UserImage.jpg
Kay Lun
Solution

Hi Praveen,

Like PZ suggested, using the regex function could help to replace the character in a string that you don't want, after that, count the length of the result could give you what you need.

I uploaded the oml file FYR

Hope this help.

CountString.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.