anthonyjr
(Anthony)
1
Hello fellow RPA Developers,
I would like to ask for help for Regex of Alphanumeric and Certain Special Characters.
Input: Washington St., (Poblacion 3), St@a. Rita City, “New-York”, U/SA
Expected Output: Washington St., Poblacion 3, Sta. Rita City, New York, USA
As you can see on the output, the Alphanumeric were retained and some special characters such as period(.) and comma(,)
Best Regards,
Anthony Jr.
Try This:[^!@#$%^&*/()]+
Hope is works
2 Likes
mkankatala
(Mahesh Kankatala)
4
Hi @anthonyjr
Use the replace and remove functions to get the required output.
- Assign -> StrVar = "Washington St., (Poblacion 3), St@a. Rita City, “New-York”, U/SA"
- Assign -> output = StrVar.Replace("(","").Replace(")","").Replace("@","").Replace("/","").Replace("-","").Remove(45,1).Remove(52,1)
Hope it helps!!
system.text.RegularExpressions.Regex.Replace(input_String,“[^a-zA-Z0-9.,\s]”,“”)
1 Like
All the solutions presented were working but this kind of solution is what I’m looking for, more dynamic and flexible.
Thanks miss @sasi_poosarla and also to sir @tazunnisa.badavide , @rlgandu , @mkankatala and @lrtetala
3 Likes
system
(system)
Closed
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.