I tried to use regex to search through


by using


The tilde or lack of was tripping me up... am I even close?
I was just trying to extract the username at the end, before it was marked off by a double quote ("). I tried adapting this answer from a previous forum post but it doesn't seem to be working. Any help would be appreciated.



Thanks so much, I'll test it out and see if I can get it working, I should be able to.

I don't know how to tie it in to

else {

	$timeout = 300;




	while($contents = fread($handle,'1024'))

	{ $hold .= $contents; }

above it. Could anyone tell me what function the ~ serves? I don't see it in any regex guides.

The tilde has no special meaning, it was just chosen as the delimiter so the slashes didn't have to be escaped. You can choose pretty much any delimiter.

$regex1 = '/http:\/\/www\.example.com\/blah/';
// vs
$regex2 = "#http://www\.example\.com/blah#';

I prefer to use / and # but it looks like the tilde was their choice.