Insert special character after and before a string

i have a variable containing values like - 1,2,34,45,678,…
i want the output to be - ‘1’,‘2’,‘34’,‘45’,‘678’

one of many options: using regex replace

System.Text.RegularExpressions.Regex.Replace(strText,"\b(\d+)\b","'$1'")

$1? HOW TO REPLACE THAT?
coz the first value wont be constant everytime

its not about replace $1 - $1 is indicating to use the Regex group value which we hade defined within the regex pattern

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

just refer to the screenshhot from immediate panel, where the numbers are finally surrounded by ’

Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

1 Like

oh ok got it thanks
this was too quick and very helpful

perfect so we can close the topic by marking the helping post
Forum FAQ - How to mark a post as a solution - News / Tutorials - UiPath Community Forum

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