I am trying to use regex to parse a string and extract the required data. Here's my string:
Validate control value for ELEMENT - VerifyFirstRowSearchNotes as ~Creating Stat Reserve: ~IP: Claimant Driver; IP Role(s): Owner, Driver~Exposure
I am trying to capture the data using the below regex pattern. I am interested in the data that follows "as" in particular. However, I am only able to capture control value below and not able to extract anything after "as" and assign it to fields group:
string actionpattern = @"Validate control value for ELEMENT - (?<control>.*?)as (?<fields>.*?)";
var regex = new Regex(actionpattern, RegexOptions.IgnoreCase);
var match = regex.Match({above string});
Let me know what I have been doing wrong. I am new to regex and in the process of learning.