Saturday, 28 September 2013

regex to get strings before and after the colon

regex to get strings before and after the colon

I am having string like following
olah billo:78517700-1f01-11e3-a6b7-3c970e02b4ec, jiglo
piglo:68517700-1f01-11e3-a6b7-3c970e02b4ec, nimho
james:98517700-1f01-11e3-a6b7-3c970e02b4ec, kathy
ruck:38517700-1f01-11e3-a6b7-3c970e02b4ec
I want to have a regex to get the string before and after colon in a Map
with key the string after colon. I want to know what is the most efficient
way.

No comments:

Post a Comment