Hi,
I am trying to add a comma “,” from the right end only after a capital letter.
Input: “First Lastname AGNP”
Expected output: “First Lastname, AGNP”
Any help will help, Thanks in advance.
Hi,
I am trying to add a comma “,” from the right end only after a capital letter.
Input: “First Lastname AGNP”
Expected output: “First Lastname, AGNP”
Any help will help, Thanks in advance.
System.Text.RegularExpressions.Regex.Replace(DateToday,"[A-Z a-z]+\s[A-Z]+","[A-Z a-z]+\,\s[A-Z]+")
Multiple options, but here’s one:
Input = "First Lastname AGNP"
new_Input = Input.replace("Lastname", "Lastname" + ", ")
Hi @jai_kumar2
Try this:
inputString = "First Lastname AGNP"
outputString = inputString.Insert(inputString.LastIndexOf(" ") + 1, ",")
Hope it helps!!
Hi @rlgandu Thanks for the reply
This output add comma to every caps in the string like “First , Lastname , A, G, N, P”
But Expected output: “First Lastname, AGNP”
No it doesn’t…
You’re welcome @jai_kumar2
Happy Automation!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.