0

I want to create an RTF reader, and I want to get the plain text part. But I can't "delete" the commands from the incoming string 's'...

var plain = s.replace(/\\.*(\\|\s|{){1}/g,"");
DBalazs
  • 133
  • 2
  • 9

1 Answers1

-1
\\[^\\\s]*(?=\s|\\|{)

Try this. see demo.

http://regex101.com/r/lS5tT3/59

vks
  • 67,027
  • 10
  • 91
  • 124