in reply to regex to remove a word from string

I do not know whether this is a correct approach.

$str = "auth_plugin_stack = a,b,EXT::USCC::USCCAuth,c,d"; print "$str \n"; $str =~ s/((\w+::)+\w+,)//; print "$str \n";
answer:
auth_plugin_stack = a,b,EXT::USCC::USCCAuth,c,d auth_plugin_stack = a,b,c,d