Regex select a word include matching characters

Hi,

I need a small help with regex matching “Achens Gerage Portsworth”; “Achens Gerage Northen”;

In the first and second words are always constant, 3rd word is always change. So, I want to match the
system.Text.RegularExpressions.Regex.Match(EntirePDF,“(?<=Achens Gerage)”).Tostring

Result: Achens Gerage Portsworth (I want end result should be like ).

I just want to match with 1st and 2 nd word and extract the 3rd word, and in the result 3 words are combined together.
Thanks in advance

I tried with this its working:
(^((?:\S+\s+){3}\S+).*)
Thanks

Do you know the different possible values of third word?

Hi there, Not much actually. Do you? please share. Thanks in advance

Yo may try something like this: (Achens Gerage)\s\w*\b

image

Hi @Ping_Pong

You can try with this as well

Regards
Sudharsan

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