jithendra pasala

jithendra pasala

  • NA
  • 53
  • 37.1k

Regular Expression required

May 7 2014 4:58 AM
Hello All,

I want to break the strings by using the Regular Expression:

String1:"((((G011, G012) + !(111_HIGH_SECURITY)) + ALLRAD))"

Output:
G011+ !(111_HIGH_SECURITY) + ALLRAD
G012+ !(111_HIGH_SECURITY) + ALLRAD

String2:"((((G011, G012) + !(111_HIGH_SECURITY)) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME, 5DP_PARKASSISTENT, 5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME) + Baustand<1611))"

Output:
(G011 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME) + Baustand<1611)
(G011 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5DP_PARKASSISTENT) + Baustand<1611)
(G011 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME) + Baustand<1611)
(G012 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME) + Baustand<1611)
(G012 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5DP_PARKASSISTENT) + Baustand<1611)
(G012 + !(111_HIGH_SECURITY) + !(5DF_GESCHWINREGSTOPGOFKT) + !(5AT_DRIVING_ASSISTANT_PLUS) + !(5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME) + Baustand<1611)

Single Regular expression should serve for Both string1 and string2.  

Thanks in Advance

Answers (1)