Click here to Skip to main content
15,891,908 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I have some data to deal with .


data:

{"face":603,"flag":285786694,"nick":"陈德兴","uin":906516573},
{"face":9,"flag":17302022,"nick":" 拉丁香烟","uin":99689067},
{"face":0,"flag":289948238,"nick":"冰血封情","uin":1838638686},
{"face":654,"flag":512,"nick":"NIU","uin":1019680323}
{"face":603,"flag":294126146,"nick":"̶4̶1̶9̶5̶8̶1̶3̶","uin":1678381076},


I want to use regular expression to get the "nick" and "uin" out .


output:

陈德兴 906516573
拉丁香烟 99689067
冰血封情 1838638686
NIU 1019680323
4̶1̶9̶5̶8̶1̶3̶ 1678381076


Who can write a regular expression for me to deal this data .
Posted
Comments
Sergey Alexandrovich Kryukov 9-Dec-12 2:11am    
Not a valid question. Many can. What did you try? What was the problem?
--SA

1 solution

Try:
(?<="nick":")(?<Nick>.*?)(?:","uin":)(?<Uin>\d+)

Get a copy of Expresso [^] - it's free, and it examines and generates Regular expressions.

[edit]HTML Encoded - OriginalGriff[/edit]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900