I have a string which is like
"AB-123,XYZ-456,AB-11,AB-3423,XYZ-1" I want to separate out all AB's in one string and XYZ in another. I can do it using stringtokenizer and match the AB's and XYZ and build tow new strings out of it, is there a better way to achieve this.
Thanks.