Hi, I'm looking to filter some information from the source code of some website. I need to be able to output any text between quote marks - have tried very hard to get it to work but cannot. The information I need is all in one of many lines on the page which begins with the text: new Module_Members(71933, {"group_by_titles"
Here is an excerpt, I'm mainly interested in names, post_count, datejoined, location
{"team_id":"15212","post_count":"29","chatstatus":"online","lastseen":"<div class=\"online\">Online Now<\/div>","datejoined":"May 8, 14","user_id":"776664","group_name":null,"name":"David","displayname":"David","location":"GB"} {"team_id":"15112","post_count":"33","chatstatus":"online","lastseen":"<div class=\"online\">Online Now<\/div>","datejoined":"May 8, 13","user_id":"776624","group_name":null,"name":"Peter","displayname":"Peter","location":"US"}
The best I could come up with is this:
$file=gcC:\Users\desktop\sr.htm|select-string-pattern"group_by_titles"
$matches_found = @()
$file |%{
if($_-match'(?<=")[^"]*(?=")'){$matches_found+=$matches[1]}
}
$matches
output is:
Name Value
---- -----
0 group_by_titles
- Edited by Quarkspace 19 hours 42 minutes ago too much at bottom