1

I'm currently writing in markdown and converting using Pandoc, but there are additional replacements that I want to do, as well as fixing some of what pandoc does that I don't like. Does anyone know the best approach to writing a script or somehow automating the process of find+replace using regex?

I'm not asking for someone to do this for me, but it would be great just to get a hint as to what kind of thing I need (e.g. which programming language, if I need to go down that route).

2
  • 2
    This sounds more like a shell-scripting question. I'd look into using sed (or awk, which I don't really use, but it is powerful), or perl if you like.
    – jon
    Commented Jul 1, 2014 at 14:47
  • One easy command is rpl (replace) in Linux.
    – Fran
    Commented Jul 1, 2014 at 19:33

1 Answer 1

1

If your needs are not easily met with sed/awk you can use the pandocfilters library for python. Be sure to check out the pandoc scripting tutorial for general information and information specific to pandocfilters.

Github repo: pandocfilters

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .