Regex - help with my use case

Hi, I am using regex.

E.G.
G Operating Sys (Linux Redhat v6.x, Ent 64 bit (small
G Operating Sys (OS8 MS Win Svr 2012R2 EE)

Regex expression: (?=Sys )\w+\s+\S+\s+\w+\s+\w+

Current Outcome:
image

Expected Outcome:
Linux Redhat v6.x, Ent 64 bit (small
OS8 MS Win Svr 2012R2 EE)

I need all the words(with no fixed limit) behind Operating Sys.

Pls help.
Thank you xoxo

HI @sangasangasanga,

Pattern → (?<=Sys ).*

Regards,
Arivu

1 Like

@arivu96 The expression works in regex but in uipath gives error.

System.Text.RegularExpressions.Regex.Match(line, “?<=Sys ).*”).ToString

image

image

I was missing the opening parenthesis in the regex lookbehind grouping:
System.Text.RegularExpressions.Regex.Match(line, “(?<=Sys ).*”).ToString()