Q: Regex for getting key:value from JSON in C# what is the pattern for getting a-z, A-Z, 0-9, space, special characters to deteck url
This is my input string:

{id:1622415796,name:Vincent Dagpin,picture:https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/573992_1622415796_217083925_q.jpg}

This is the pattern: so far
([a-z_]+):[ ]?([\d\s\w]*(,|}))

Expected Result:
id:1622415796
name:Vincent Dagpin
picture:https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/573992_1622415796_217083925_q.jpg

the problem is i can't get the last part.. the picture url..
any help please..

A: If this is the only kind of json input you expect and further json parsing is very unlikely, a full json parser would be overkill.
A string split may be all you need, jsonString.Split(',', '{', '}');
The regex for that would be along the lines of [{},]([a-z_]+):[ ]?(.+?)(?=,|})
If you can modify the json string that's being sent, you can key the RegEx on something else, like double quotes. Here's one I'm using that requires knowing the json key name. System.Text.RegularExpressions.Regex("(?<=\"" + key + "\"+ *: *\"+).*(?=\")");

A: I don't think a regex is the right solution. C# already contains the tools you need in JavaScriptSerializer. Check out the answer here to see how.
