I am getting data from a CSV File that looks like this:
Rob^,
Blah,
Blah,
Fail,
Fail,
Bob^,
Stuff,
Stuff,
Stuff,
Sam^,
Stuff,
Stuff
What I am trying to do is group everything that is between Rob^ and Bob^. So far my Regex looks like \w+\^(,\n\w+)+ but Bob is getting selected. I have attempted at using look aheads but I haven’t had any success. Thanks
Try the following:
By moving the
,\nto the end of the group it prevents you from matching lines with a^in them, the,?is necessary for the very last line in the file, since it does not contain a comma.