Regex find anything before string XY

Hello Guys,

First: Thanks for helping so fast all the time!
I got another Regex Problem:
In the attached file I want to find the number 155987 it’s always followed by a -ÜZ and always 6 digits.
How do I find it?

Einzahlungen.txt (345 Bytes)


As @Pradeep_Shiv said you can use \d{6}(?=- ÜZ)

1 Like


if its working fine mark this as a solution and close this thread @SSchmitz


You can also try (?<=-UZ).*

or for specific digit
or for your data

it’s going to give him the forward value of a string

Hey Guys, Only with image i get a solution. But I want to make sure only 6 digit numbers are grabbed. Thanks!

1 Like

Then use the one that I posted.

Hi @SSchmitz,

Try this,


This will fetch only 6 digit numbers…!

regex6DigitNum.xaml (7.0 KB) Einzahlungen.txt (345 Bytes)


1 Like

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