You must be confusing that error message with perhaps a previous preg attempt? When I cut and paste your code and test it, I get:
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: missing ) at offset 9 in C:... .. .. .
I think you mean
preg_match_all("/(?<!\\\)\w+/i", $foo, $bar); // notice the three escape slashed bundled..
As for your look behind assertion, you cannot have any unknown lengths..
so for example,
preg_match('#(?<=\s+)\w+#', $str, $match);
// illegal due to the + quantifier. Cannot have quantifiers in a lookbehind assertion..
I think you can have quantifiers in look ahead assertions.. but not in look behinds..
Cheers,
NRG