How to capture the words that are after an exact initial word?

Good morning friends;
One query please, I tried the following regex to capture the word after “ENVIO”, but I only want the files that have that exact word at the beginning

(?<=ENVIO)(.*?)(?=\d.)

ENVIO HOME ATT 28012022.xlsx
MEDIOS ENVIO PRONVINCIA 01-01
TOTAL ENVIOS 28012022

expected result:

ENVIO HOME ATT 28012022.xlsx

Hi @Lynx ,

Is this what you were looking for?
image

(?<=^ENVIO)(.*?)(?=\d.)

Kind Regards,
Ashwin A.K

1 Like

we do understand that you are intrerested on filenames. So we assumend that on the end we can rely on the logic of file extension

grafik
ENVIO.*?\.\w+$

1 Like

I was my mistake, I put the expected result wrong, it was just the core text “HOME ATT”

1 Like

then you are served with the pattern from @ashwin.ashok

Yes, Thank you very much to all

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