# Matching delimiters in a string with regular expressions

**URL:** <https://discourse.julialang.org/t/matching-delimiters-in-a-string-with-regular-expressions/2736>\
**Category:** General Usage\
**Tags:** question\
**Created:** [March 17, 2017, 5:39pm UTC](https://discourse.julialang.org/t/matching-delimiters-in-a-string-with-regular-expressions/2736 "2017-03-17T17:39:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [March 17, 2017, 5:39pm UTC](https://discourse.julialang.org/t/matching-delimiters-in-a-string-with-regular-expressions/2736/1 "2017-03-17T17:39:57Z")

</div>

I am working on converting `IJulia` notebooks to [markua](https://markua.org) source files. Like markdown cells in a `IJulia` notebook, markua uses a superset of Markdown but not always with the same convention. In Jupyter markdown LaTeX expressions are delimited with `$`. In Markua they should be delimited with backquotes, like a code span, followed by a single `$`.

This substitution seems like a job for regular expressions. An alternative is just to split the string on the `'$'` character and sew the pieces back together. Suggestions?
