Reqex need to get

I need to get the last number, beneath “Netto”. In this Case 6 156. It will always be under “Netto” in the end of the line. I uploaded a picture to show how it looks.

" Indrykningsdato Brutto Rabat Netto
30-03-2022 Grundpris 10 995 Forh. rabat 44,01 % -4 839 6 156
Miljøtillæg 285 285
Web gebyr 379 Forh. rabat 100,00 % -379 0
I alt eksl. provision 6 441
Informationsgodtgørelse 1,00 % -65
Sikkerhedsstillelse 1,00 % -65
I alt 6 311"

Give a try at following pattern:


(?<=Netto)[\s\S]*?(\d \d+)$

And refer to group 1

What do you mean by refer group 1? How do i do that in uipath?

Assign Activity

strFoundText = System.Text.RegularExpressions.Regex.Match(YourInputTextVar, YourPatternVar).Groups(1).Value

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum


When using matches in uipath, it dosnt work

Best would be, that you will share the text as text file. Kindly note that we mentioned the API not the Matches activity

tekst.txt (1.1 KB)

Im sorry, i dont know what API you are reffering to. :slight_smile:

Step 1:
Get the second line using the below regex
(?:\r\n?|\n){2}(.+)
Step 2: Store this line in a string variable
Step :3
Find out last string present in string variable using below regex
\b(\w+\s*\w+)$

It is not allways the second line, but it is the line after the word “Netto”

Use the below regex to get the line after word “Netto”.
Netto[\r\n]+([^\r\n]+)
Then use the below regex to get the last string of the line.
\b(\w+\s*\w+)$

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