Debugging a Regex result


I am validating a excel file.

For each row i run regex. If true, erase cell, if false, ignore.
Everything was going great but after adding more then one regex, i start getting only false result.

So here what i want to do : I want my message box to tell me This cell number + “is false” while looping through all the row.

I tried telling it the collumn name with “Level 5 is False” + row(“Sub-Folder Level 5”).ToString
to at least get the text inside the cell but i crash.

Any idea ?

Hi @Nicolas_Lamoureux !
Bienvenue sur la UiPath Community :grinning_face_with_smiling_eyes:
Would you mind sharing your workflow (xaml) with us so that we understand more the reason why the regex is not working + a sample of your data ?
If you can’t upload your xaml file, would you mind copy/paste a screenshot of your workflow ?

See bellow the link to the files

Tanxs for the help

Hi @Nicolas_Lamoureux
Thank you for the elements.
From the regex I see, it looks like you want to see if there is “%”.
So if I understand the business rule:
For each row, for each column:

  • if there is “%” then erase the content of the cell
  • else do nothing

Is it so ?


The % mean that variable data will be insert by a third party apps and we need the space empty.

@Hiba_B : Any idea ?

Hi @Nicolas_Lamoureux !
Here is another suggestion, it seems to work fine:
Deployement files RPA.xaml (43.1 KB)
I did not look further to understand why the regex is not working, sorry :frowning:

Hello @Hiba_B !

Tanxs for trying, really appreciate people who walk the extra miles in lifes.
I have open your files but i cannot see what you did. Could you walk me through your process ?


@Nicolas_Lamoureux sure:

When you open the process, you’ll find these elements in the 1st sequence named Check Validity:
So inside there is:

  • a classic read range (the 2nd one, as the 1st one is the code you wrote)
  • a foreach row that will loop in lines of the datatable
  • a foreach column that will loop in columns of your datatable lines
  • inside the foreach column, we see if the value has % or not, and according to that something is done:
  • if the data has “%” then we remove all the data
  • if the data does not have “%” then we do nothing
1 Like

Elegant solution.


1 Like

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