Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

easy regex question: stops on some white space?



my problem is solved, mu ha ha ha ha haaaa!  again
many thanks to tom.

how kiddy code eric extracts info and transforms it:

// process uploaded .torrent. extract announce & hash
$handle = fopen($userfile, "r");
$hash = fread($handle, 30000);
$prehash = $hash; // tom said to check this!
preg_match("/info.*/s", $hash, $hash); // info subset
$hash = implode($hash);  // this feels stupid
$hash = ltrim($hash, "info");
$posthash = $hash;  // did regex work?
$hash = rawurlencode(mhash(MHASH_SHA1, $hash)); //
info %nn encoded

thanks again for the help blu!

- eric c.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org