# Regex w/ String Interpolation

**URL:** <https://discourse.julialang.org/t/regex-w-string-interpolation/3545>\
**Category:** General Usage\
**Tags:** question, regex, string-interpolation\
**Created:** [May 5, 2017, 9:10pm UTC](https://discourse.julialang.org/t/regex-w-string-interpolation/3545 "2017-05-05T21:10:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [May 5, 2017, 9:13pm UTC](https://discourse.julialang.org/t/regex-w-string-interpolation/3545/2 "2017-05-05T21:13:53Z")

</div>

```julia
a = "focus"
r = Regex("$(a)\\s*:\\s*true")
ismatch(r, "# focus: true")

```

---

_[View the full topic](https://discourse.julialang.org/t/regex-w-string-interpolation/3545)._
