Form a pattern on the sentence based on user input

I have input dailog which takes the input from the user

Eg if the user gives input as - My name is Ishan

The output should be :

image

Eg - if the user gives input as - I like apples

The output should be :

image

HI @Ishan_Shelke

You can try with regex expression

System.Text.RegularExpressions.Regex.Replace(YourString,"\s","*").Tostring

Regards
Gokul

Hi @Ishan_Shelke

Try also with this expression

System.Text.RegularExpressions.Regex.Replace(yourString,"\s|$","*").Tostring

image

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.