The question:
I am receiving strings from my Autonomics Which is used for messagebox popups.
In each case, there is a GUID, Header, Description followed by either three field sets (Case 1), or two Field Sets (Case 2).
(field sets are between the 0's)
Shouldn't I be able to make the Regex have an Optional section for the third field?
I tried bracket question mark around the last regex group, didn't work (in the Guidesigner regex tester)
Regex: UI=MessageBox.\{(.*)\}.\"(.*)\".\"(.*\?)\"..*\d.\"(.*)\".\"(.*.\\\".*\\\").*\d.\"(.*)\".\"(.*)\".*\d.\"(.*)\".\"(.*.\\\".*\\\")\.*" (thanks to original author, Terence)
Case 1: UI=MessageBox {122f5622-e532-4940-b86f-642eae65a7cc} "Edit Pandora station 'Bullitnuts Radio'." "What would you like to do to this station?" 30 "Delete the station" "AckButton 122f5622-e532-4940-b86f-642eae65a7cc \"Delete the station\"" 0 "Edit the station" "AckButton 122f5622-e532-4940-b86f-642eae65a7cc \"Edit the station\"" 0 "Cancel" "AckButton 122f5622-e532-4940-b86f-642eae65a7cc \"Cancel\"" 0
Case 2: UI=MessageBox {122f5622-e532-4940-b86f-642eae65a7cc} "Edit Pandora station 'Bullitnuts Radio'." "What would you like to do to this station?" 30 "Delete the station" "AckButton 122f5622-e532-4940-b86f-642eae65a7cc \"Delete the station\"" 0 "Edit the station" "AckButton 122f5622-e532-4940-b86f-642eae65a7cc \"Edit the station\"" 0
Of course, I could build two regex's for each case, but that seems inelegant.
Thanks as always,
Chap