How to add "-" between alfa and numeric

Hello Developers,

I have a input string (ex: abc123, ABCD1234, XYXYTR8520)
i want to add “-” between alfa and numeric output should be (ex: abc-123, ABCD-1234, XYXYTR-8520)

Please advice

grafik

then using groups for replacement:
grafik
grafik

1 Like

i am not able to understand

if possible can you share this in xaml file please

@manish_patel - you can try like this…

image

in the import tab, please import system.text.regularexpressions

2 Likes

Sure give me some time
Also have a look here:

in code we can do like this:
grafik

Regex.Replace(YourStringVar,"([A-Z]+)(\d+)",function (x) x.Groups(1).ToString & “-” & x.Groups(2).ToString )

Ensure Following:
grafik

Thanks its working fine

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