Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: expression
I have some data to deal with .
 

data:

{"face":603,"flag":285786694,"nick":"陈德兴","uin":906516573},
{"face":9,"flag":17302022,"nick":" 拉丁香烟","uin":99689067},
{"face"Blush | :O ,"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 8-Dec-12 20:08pm
Comments
Sergey Alexandrovich Kryukov at 9-Dec-12 2:11am
   
Not a valid question. Many can. What did you try? What was the problem?
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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]
  Permalink  
v2

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 470
1 Gihan Liyanage 317
2 ClimerChinna 182
3 vikinghunter 176
4 OriginalGriff 141
0 Sergey Alexandrovich Kryukov 8,653
1 OriginalGriff 7,132
2 CPallini 2,598
3 Richard MacCutchan 2,060
4 Abhinav S 1,808


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 9 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100