$string = 'var togo = "gowentgone"';
how can i grab the text with preg_match_all? preg_match_all('/"(.*)"/i', $string, $result) ;
Correct. You might just as well use preg_match though, and the /i modifier won't make any difference.
Another way to do the same thing would be /(?<=").*(?=")/