i'm looking for a way, to match all except the some word.
please tell me how i must wrote it?
when i wrote
$str = "i am a programmer";
$word = "am";
preg_match_all("/[^($word)]/", $str, $matched);// it do the same, if i when i wrote
preg_match_all("/[^$word]/", $str, $matched);
i also tried preg_match_all("/[^{$word}]/", $str, $matched);
but it doesn't do the job.
how can i tell all except that word ?
Thanks Much