fork download
  1. pat <- "\\S*[^[:alnum:][:space:]?!\",();:.'/-]+\\S*"
  2. x <- "But what's about in a interacting QFT a 2-particla state in the far past: $|E_{\\bf p_1}, {\\bf p_1}, E_{\\bf p_2} {\\bf p_2}&gt;$ which undergoes"
  3. gsub(pat, "", x)
  4. gsub(pat, "", x, perl=TRUE)
Success #stdin #stdout 0.23s 60752KB
stdin
Standard input is empty
stdout
[1] "But what's about in a interacting QFT a 2-particla state in the far past:         which undergoes"
[1] "But what's about in a interacting QFT a 2-particla state in the far past:         which undergoes"