Am trying to extract a word after a specific text

Im trying to extract a word after a specific text , example i need to extract a word/number after the text “Purchase order” from a note pad using regex , currently am using “(?<=Purchase Order: )\W” , but it is not working when i tried to display it is showing as in the screenshot
image

Any suggestions ?

HI @JOBIN_JOSE

Use like this in the message box

Variable(0).ToString

Regards
Sudharsan

tried but the message box is blank then , there is a space after the word ? is that the prob ?
image

Can you share the text file here? @JOBIN_JOSE

image

this is actually extracted from a pdf and is stored to a notepad

Try this pattern @JOBIN_JOSE

(?<=Purchase Order )\d+

Regards
Sudharsan

1 Like

perfect it is working fine now , Thank you @Sudharsan_Ka

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