REGEX QUESTION - HOW TO REMOVE SPECIFIC STRINGS FROM DATATABLE

Hi there,

I am currently facing an issue -> My regex expression (.+ \d*)(\n?)(.(\d*)*.) is identifying the first string line, and the main goal is to remove it, and to only leave the 5 lines below

"

Mova o calendário para cima 1.6900

AGE ACTION(@ 73.72)
Pular 1 em 73.52
Pular 2 em 73.22
Pular 3 em 72.72
Chutar at 74.74

"

Thank you.

Hi @billabong271294

Welcome to forum

Can u explain ur query well?

Hi Nived, thank you,

I need to remove the first separate string and only leave the other five as below:

image

Thanks.

Hi @billabong271294

Instead of trying with regex

Try with string manipulation operation like spilting the string and removing the first line

@billabong271294 - @NIVED_NAMBIAR suggestion is easy…If you still want to go with Regex…Please try this below…

2 Likes

Hi @billabong271294

Try this too

Let’s consider

input = "

Mova o calendário para cima 1.6900

AGE ACTION(@ 73.72)
Pular 1 em 73.52
Pular 2 em 73.22
Pular 3 em 72.72
Chutar at 74.74

"

Let’s intialise a list of string by using assign activity

list_1= New List (Of String)

list_1= Spilt (input, Environment.NewLine)

Use the invoke method to remove the element from list (remove element at zero index)

Check invoke method for this How can i delete a element from a List of String in UiPath - #3 by Santan_Barnwal

Then u use join operation for joining string together

String.Join(Environment.NewLine,input.ToArray)

It worked, thank you very much, appreciate it! :wink:

1 Like

Hi Nived, thank you for your commitment and for answering to my question. Looking foward to see you in my next regex question!

Sincerely, BillaBong.

1 Like

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