C:\>echo "one & two &# three  four & five & six" | perl -pe "s/&(#(3(8(;\K)?)?)?)?//;" "one two &# three  four & five & six"