# Perform multiple replacements on a string in a single pass

**URL:** https://discourse.julialang.org/t/perform-multiple-replacements-on-a-string-in-a-single-pass/43247
**Category:** Performance
**Tags:** strings, regex
**Created:** [July 17, 2020, 4:22pm UTC](https://discourse.julialang.org/t/perform-multiple-replacements-on-a-string-in-a-single-pass/43247 "2020-07-17T16:22:12Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)
#### Post date: [July 17, 2020, 5:39pm UTC](https://discourse.julialang.org/t/perform-multiple-replacements-on-a-string-in-a-single-pass/43247/4 "2020-07-17T17:39:28Z")

</div>

What I would expect is that the first substitution that matches is used, or an error is throw. Seems intuitive to me.

---

_[View the full topic](https://discourse.julialang.org/t/perform-multiple-replacements-on-a-string-in-a-single-pass/43247)._
