I have the following line stored in the sentence object:
sentence <- "aazdlubtirol: RT @tradeDayTrades: sister articles \"$AAPL Dancing in a Burning Room\" January 2013 http://t.co/tkuCRfLy \" $AAPL vs $AAPL \" August 2011 http://t.co/863HkVjn"
I am trying to use gsub to remove urls starting with http :
sentence <- gsub('http.*','',sentence)
However, it replaces everything after http :
aazdlubtirol: RT @tradeDayTrades: sister articles \"$AAPL Dancing in a Burning Room\" January 2013
I want to:
aazdlubtirol: RT @tradeDayTrades: sister articles \"$AAPL Dancing in a Burning Room\" January 2013 \" $AAPL vs $AAPL \" August 2011
I am trying to clear the urls, so if the string contains http , I want to remove the url. I found some solutions, but they do not help me.
Aniks source share