filename indata url 'http://forums.vwvortex.com/showthread.php?7286873-To-our-readers' lrecl=10000;
data testlocation;
infile indata length=len;
input record $varying10000. len;
retain start;
if record =: '<body>' then start=1;
if start then do;
record=prxchange('s/\<[^\<\>]+\>//',-1,record);
if not prxmatch('/^\s+$/',record) then output;
end;
run;
data want;
set testlocation;
lag=lag(record);
if prxmatch('/^\s*View Profile/',record) then do;record=lag;output;end;
if prxmatch('/^\s*(Join Date|Location|Posts)/',record) then output;
run;
... View more