jithendra pasala

jithendra pasala

  • NA
  • 53
  • 36.9k

Regular Expression in next type

May 2 2014 4:41 AM
Hello All,


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


String1:"((G011, (G012 + !(111_HIGH_SECURITY))) + !(ALLRAD) + (B48B20, XB1141) + OL + (PLUGIN_HYBRID))"


Output:
(G011 + !(ALLRAD) + B48B20 + OL + (PLUGIN_HYBRID))

(G011 +  !(ALLRAD) + XB1141+ OL + (PLUGIN_HYBRID))

(G012 + !(111_HIGH_SECURITY)+ !(ALLRAD) + B48B20 + OL + (PLUGIN_HYBRID))

(G012 + !(111_HIGH_SECURITY)+ !(ALLRAD) + XB1141+ OL + (PLUGIN_HYBRID))


String2:"((G011, (G012 + !(111_HIGH_SECURITY))) + (KEIN_HYBRID))"


Output:
(G011 + (KEIN_HYBRID))

(G011 +  !(111_HIGH_SECURITY) + (KEIN_HYBRID))

One Regular Expression should server for both the strings.


Thanks in Advance


Answers (3)