Copied expression from one project to another and now it doesn't work

Hi there guys i had this expression in one project:

inputString = System.Text.RegularExpressions.Regex.Replace(inputString,"[\s\S]*(?=\*\| Profile)","",RegexOptions.Multiline)

and got no exception then i copied it to another project and in the new project i get
“RegexOptions” is not declared. Why is this happening? Thanks in advance!

Hi @olmccb

Give a try with

System.Text.RegularExpressions.Regex.Replace(inputString,"[\s\S]*(?=\*\| Profile)","", System.Text.RegularExpressions.RegexOptions.Multiline)
1 Like

@fernando_zuluaga this is what i get
image

are you doing like this?

left side your variable, right side you value

System.Text.RegularExpressions.Regex.Replace(inputString,"[\s\S]*(?=\*\| Profile)","", System.Text.RegularExpressions.RegexOptions.Multiline)

ok @fernando_zuluaga , yes i have it in an assignment statement…but i guess it took some time but the exception disappeared. Thank you!!

1 Like

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