Regex replace 2 values within 1 expression

Hi Guys,

Replacing in regex but only the first line works, looking to replace both at the same time within
the 1 expression editor…

System.Text.RegularExpressions.Regex.Replace(PdfOut, “Unit”, “Unit Price”) _
&System.Text.RegularExpressions.Regex.Replace(PdfOut, “Sub”, “Sub Total”)

Thanks :slightly_smiling_face:

@MikeC

Not sure what you want to use regex replace

but if you want to combine both of them you can do like this

System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(PdfOut, “Unit”, “Unit Price”), “Sub”, “Sub Total”)

cheers

1 Like

:heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes: :heart_eyes:

I tried
System.Text.RegularExpressions.Regex.Replace(PdfOut, “Unit”, “Unit Price”), “Sub”, “Sub Total”)

Didnt realise I had to say it twice lol
System.Text.RegularExpressions.Regex.Replace(System.Text.RegularExpressions.Regex.Replace(PdfOut, “Unit”, “Unit Price”), “Sub”, “Sub Total”)

Many thanks Anil :ok_hand:

1 Like

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