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.
(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

VulpesRank #55 · 29.2K reputationPosted May 8, 2014, 8:56 AM EDT
Anyway, I've finally come up with this which seems to work:
The output (80 column console) is:
VulpesRank #55 · 29.2K reputationPosted May 2, 2014, 8:13 AM EDT
As they currently stand, there are a total of 4 right brackets for each output string but only one left bracket.
However, the brackets for the output strings of String2 are balanced.
jithendra pasala53 reputationPosted May 4, 2014, 10:07 PM EDT
please ignore previous output of string 1.
Regards,
Jithendra Pasala
jithendra pasala53 reputationPosted May 4, 2014, 10:11 PM EDT
please ignore previous output of string 1.
Regards,
Jithendra Pasala
VulpesRank #55 · 29.2K reputationPosted May 7, 2014, 10:39 AM EDT
I say this because they both begin with the same string:
((((G011, G012) + !(111_HIGH_SECURITY))
However, the output of the first string begins with either of these:
and the output of the second string begins with either of these:
jithendra pasala53 reputationPosted May 7, 2014, 9:52 PM EDT
If, Output is like this, is also OK.
Regards,
Jithendra Pasala
jithendra pasala53 reputationPosted May 9, 2014, 2:10 AM EDT
But that R.E should work for below string also:
((G011, G012) + !(111_HIGH_SECURITY)) + !(US) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME, 5DP_PARKASSISTENT, 5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME)
output:
(G011 + !(111_HIGH_SECURITY)) + !(US) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME)
(G011 + !(111_HIGH_SECURITY)) + !(US) + !(5DP_PARKASSISTENT)
(G011 + !(111_HIGH_SECURITY)) + !(US) + !(5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME)
(G012 + !(111_HIGH_SECURITY)) + !(US) + !(5DV_PARKASSISTENT_PLUS_ARBEITSNAME)
(G012 + !(111_HIGH_SECURITY)) + !(US) + !(5DP_PARKASSISTENT)
(G012 + !(111_HIGH_SECURITY)) + !(US) + !(5AU_DRIVING_ASSISTANT_PREMIUM_ARBEITSNAME)
Thanks in Advance
VulpesRank #55 · 29.2K reputationPosted May 9, 2014, 2:59 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts