r - remove all words that start with "@" from a string -
how can remove words start "@" string?
for example, "@agnezmo on @airasia airbus a320-216 fleet @ninetologymy livery -- 9m-ahg cc: @agnesmonicaent @agnezone http://t.co/hfxwuqq2oq"
i have string "on airbus a320-216 fleet livery -- 9m-ahg cc: http://t.co/hfxwuqq2oq"
try s
input:
gsub("@\\w+ *", "", s)
giving:
"on airbus a320-216 fleet livery -- 9m-ahg cc: http://t.co/hfxwuqq2oq"
Comments
Post a Comment