Pretty sure Pandoc has a plain text output option. There are a few 'strip markdown' packages available on NPM as well if you're using node.
github.com/michelf/php-markdown/tree/lib/Michelf have you tried looking at this?
you could also just strip the information into a plain AST structure and reuse it differently ....
so to the question at hand :) What do you actually want to achieve? just removing all markdowns? to a plain text?
Pier
With Slate.js you can extract the text from HTML or markdown.
slatejs.org