Need regular expression help

M

meyousikmann

So that I can use String[] mystring.split("regexp") in Java, can
someone give me the regular expression to split this string:

(0, 0.0.0.0-0.0.0.0), (1, 1.1.1.1-1.1.1.1), (2, 2.2.2.2-2.2.2.2)

into this:
(0, 0.0.0.0-0.0.0.0)
(1, 1.1.1.1-1.1.1.1)
(2, 2.2.2.2-2.2.2.2)


TIA
 
L

lord.zoltar

So that I can use String[] mystring.split("regexp") in Java, can
someone give me the regular expression to split this string:

(0, 0.0.0.0-0.0.0.0), (1, 1.1.1.1-1.1.1.1), (2, 2.2.2.2-2.2.2.2)

into this:
(0, 0.0.0.0-0.0.0.0)
(1, 1.1.1.1-1.1.1.1)
(2, 2.2.2.2-2.2.2.2)

TIA

Would this:
(\(.+\))\, (\(.+\))\, (\(.+\))
work for you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top