Regex Function with various change

7075-T74511 EXTRUSN PER QQ-A-200/j1
I need to write a regex function where EXTRUSN is alone picked and displayed. The Condition is that The word before first PER and after a sequence of a number followed by - and an alphanumeric value. The are many PER but only the word before PER I need

Will the word starts in the second

1 Like

Thanks for your reply…
Cant get you

Will the particular word “EXTRUSN” comes as second position word?

Hi @soumi_soumiya

Try this
(?=EXTRUSN)(\w*)

Thanks
ashwin S

1 Like

Thanks for your reply…
But the word EXTRUSN is not constant the word may get changed

Thanks for your reply…
No the position may change

Hi @soumi_soumiya

are you extracting the text in excel or application

Thanks
ashwin S

@soumi_soumiya Try this Regex, Hope this is what you needed :sweat_smile:
([\da-zA-Z-]+)\s*(\w+)(?=\s+PER)

1 Like