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 21: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 OriginalGriff 385
1 Sergey Alexandrovich Kryukov 329
2 CPallini 270
3 DamithSL 214
4 Maciej Los 192
0 OriginalGriff 5,515
1 DamithSL 4,451
2 Maciej Los 3,902
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,175


Advertise | Privacy | Mobile
Web04 | 2.8.141216.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