Regex Builder help using value from a variable

Hi guys,

I need your help. I tried to build a regex expression but this is quite to much for me right now.

The problem is:

  1. I have a string extracted text that is retained in a variable.
  2. In this text I need to find a specific text (currentRow(“Name”).tostring from a for each excel file and the following text after the current row.
  3. Bellow is a image of the text I need to extract: The red text is the value that current row is retaining and with yeelow background is the format of the extracted file.

Thank You.
sample.docx (17.3 KB)

test looks like CSV Data

Maybe the following strategy fits better:

  • Use Read CSV Activity | Generate DataTable Activity
  • filter on the resulting DataTable

Unfortunately it’s not an CSV. It’s an extracted text from a browser using data scrapping.

Test with this pattern:

currentRow("Name").ToString + "[\d/\|\. ]+"

looks to us very close to CSV except there is no consitent delimeter:
Such cases we can sanitie (e.g. regex replace and then parse)

But also have a look here:

I tried to test it on and I get this:

You need to change the flavor to .NET C# (which is the one UiPath is using).


Please take in consider that I have to extract all the text until the next string/name. Start with string end with string.

Hi @paul.baltag ,

Could you Check with the below regex :

TUDOR DAN EMIL.*?\d+.\d+.\d+\s

Here it is considered that the Date will always be present before the next name.

With this we can further ask, whether you would also know the next name as well ? So that we can anchor it instead of the date value.

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