First time posting on StackOverflow for me. Please go easy on me :) I am trying to parse a complex string with Regex. I have gotten close to my desired results but not quite to the finish line.
I have listed a couple example strings below. These strings change in length and verbiage when they are generated.
I want to grab the charge class (FGM)(Felony, General, Misdemeanour), all the way to the next occurrence of (FGM). This should essentially split the string every time there is a new charge.
Here is the regex that has gotten me the closest:
F - Bond/Bail Set - 609.342.1(b) Criminal Sex Conduct-1st Degree-Penetration-V F - Bond/Bail Set - 609.344.1(b) Criminal Sex Conduct-3rd Degree-Victim 13-15 F - Bond/Bail Set - 609.344.1(c) Criminal Sex Conduct-3rd Degree-Force or Coer F - Bond/Bail Set - 609.748.6(d)(6) Harassment; Restraining Order - Violate - Vic F - Bond/Bail Set - 609.748.6(d)(6) Harassment; Restraining Order - Violate - Vic
It's pretty close, but it's grabbing too much. It should stop at the next occurrence of F G M (Felony, General, Misdemeanour) as shown in the image below.
Does anyone know of a way to accomplish this with regex?