Regex with variants

Hello Guys,

I need to find 1704218 and 1461275 1472307 etc.Bills_2.txt (846 Bytes) Bills_3.txt (376 Bytes) Bills.txt (752 Bytes) I want to get only the numbers without the L or B they are always 7 digits and is always after the ‘L’ or the ‘B’ or before ‘BRP’

Thx for your help

Hi @SSchmitz,

use below regex

(?<=L|B|)\d{7}(?=(-BRP| ))

Regadrs,
Arivu

3 Likes

Hi,

Can you try the following regex pattern?
"(?<=[BL])\d{7}|\d{7}(?=-BRP)"

FYI, I’ll attach a sample as the following.
Sample20200127-1.zip (10.7 KB)

Regards,

1 Like

Works aswell. :slight_smile:

1 Like

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