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"
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+)$
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+)$