Need Help on RegEx issue

Hi,
I have following data on pdf which I need to extract using regex

Now the question which is “Who has access to the digital solution?” will be constant and I need to extract below options which will be dynamic value,
here you can see two options are available which are a and c but it may contain one or more options.

So any suggestion on how to extract the options using the question above with the help of regex?

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Who has access to the digital solution\?\r?\n)[\s\S]*?(?=\r?\n\r?\n)").Value

Regards,

1 Like

did it work for you ?

Not working for me though

Hi,

Can you set your string to yourString variable?

Regards,

see, I am doing like below, using activity

In the input section, I have put the data

@Debartha_Mitra_DE - there is no groups in the pattern which @Yoichi shared…

so just use Matchvalues(0).value.tostring

1 Like

@Debartha_Mitra_DE

Can you try as below

matchValues(0).ToString

Thanks

1 Like

tried but threw the same error.

Hi,

It might be no match.
Can you share your string as text (or text file), if possible?

Regards

Regex Master @Steven_McKeering

1 Like

“# Who has access to the digital solution?
a. PwC Owning Member Firm Users - Employees/Contractors of owning territory
c. Client Users - Client Users”

There can be text before ‘#’ which is not required and after the end of options which is not required

Hi,

Can you try the following sample?

Sample20210325-1.zip (2.6 KB)


Regards,

1 Like

@Yoichi is here and will save the day @seanrockvz13 @Debartha_Mitra_DE

2 Likes

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