Regex Pattern issue

I need to create a regular expression for this file.
The yellow color are field names and green color are their respective values.
I was using the above pattern for this. This pattern extract the value till the empty space.
But the issue is for Tesco Recieving Centre ,Depot No you can see the value itself having space so it get only RECIEVEADVICE text only.
I am using the pattern inside the loop . So I can’t able specify the pattern for this field alone.
data.txt (1.0 KB)


Can you try the following pattern?



1 Like

Hi @agathiyanv

Is the word “RECIEVEADVICE” constant?

Can you try this. The below patterns will catch the word if it exists.

Option #1:

Option #2: Use if RECIEVEADVICE is not constant but a capital letter word is.

Preview the pattern here. Note: the green captures.




Hello @agathiyanv Try this regex Expression

1 Like

Thank you @Steven_McKeering It worked

Thank you @Yoichi for you help

Thank You @Gokul_Jayakumar

Always happy to help :blush:



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