How Extract Sentence Before Specific Word

Hi !

I am trying to Extract sentence before the DWG# word but unfortunately, its extract the whitespace as shown in the below image. Could anyone help me please? Thanks

Hello @Teaf,

Do you need to get all before the word DWG?

No i need item No

Hi @Teaf ,

Could you try this instead?

.+(?=\r?\nDWG#)

Kind Regards,
Ashwin A.K

\w+(.*)\w+(?<=:)

unfortunately the output same

Sorry, I meant to type in this

.+(?=\r?\nDWG#)

Kind Regards,
Ashwin A.K

Thanks !!!

1 Like

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