Looking for a regex
Posted: Sun Aug 07, 2011 1:29 am
I have a string like this.
"bar_1":"4","bar_2":"4","bar_3":"4","bar_4":"3","bar_5":"4","bar_6":"4","bar_7":"4","bar_8":"4", "foo_1":"4","foo_2":"4","foo_3":"4","foo_4":"3","foo_5":"4","foo_6":"4","foo_7":"4","foo_8":"4"
And i want to split it to two strings.
"bar_1":"4","bar_2":"4","bar_3":"4","bar_4":"3","bar_5":"4","bar_6":"4","bar_7":"4","bar_8":"4"
and
"foo_1":"4","foo_2":"4","foo_3":"4","foo_4":"3","foo_5":"4","foo_6":"4","foo_7":"4","foo_8":"4"
Can I use regex to do that? and what is the regex?
Thank you.
"bar_1":"4","bar_2":"4","bar_3":"4","bar_4":"3","bar_5":"4","bar_6":"4","bar_7":"4","bar_8":"4", "foo_1":"4","foo_2":"4","foo_3":"4","foo_4":"3","foo_5":"4","foo_6":"4","foo_7":"4","foo_8":"4"
And i want to split it to two strings.
"bar_1":"4","bar_2":"4","bar_3":"4","bar_4":"3","bar_5":"4","bar_6":"4","bar_7":"4","bar_8":"4"
and
"foo_1":"4","foo_2":"4","foo_3":"4","foo_4":"3","foo_5":"4","foo_6":"4","foo_7":"4","foo_8":"4"
Can I use regex to do that? and what is the regex?
Thank you.