How to use \n in regex?

Am able to extract Sold To using (?<=Sold To\s)(.*)(?=\n) expression in Regex101 website but in the workflow am not getting value. Please any one give me solution. Thank You…
Ex : Sold To
Some Analytics

Hi,

It might be linebreak matter. For now, can you try the following?

(?<=Sold To\r?\n).*

Regards,

HI @Yoichi

How about this expression?

System.Text.RegularExpressions.Regex.Match(InputStr,"(?<=Sold To\n).+").Tostring

Regards
Gokul

Hey!

We can do like this

System.Text.RegularExpressions.Regex.Match(StrInputVariable,"(?<=Sold To\n).*").ToString

Reference:

Regards,
NaNi

Hello @vanithavs How about trying the below expression. Attached workflow for ref

(?<=Sold\s+To[\n\r]+\s).*

Output

output

Example.zip (2.9 KB)

This is working fine for me. Thank you

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