clean.text <- function(x)
{
  # remove rt
  x <- gsub("rt\\s", "", x)
  # remove at
  x <- gsub("@\\w+", "", x)
  x <- gsub("\\b-\\b(*SKIP)(*F)|[[:punct:]]", "", x, perl=TRUE)
  x <- gsub("[[:digit:]]+", "", x)
  # remove http
  x<- gsub("http\\w+", "", x)
  x <-gsub("\\h{2,}", "", x, perl=TRUE)
  x<- trimws(x)
  x<- gsub("[^[:alnum:][:space:]'-]", " ", x)
  return(x)
}
my_text <- "  accident-prone  http://w...content-available-to-author-only...e.com  rt "
new_text <- clean.text(my_text)
new_text