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?