I assume you are using the "regex" nimble package? If so you can assemble the 
pattern string as you wish (concatenation, using the std/strformat package, 
etc), then use the "re" function to compile it to a regex object (possibly at 
compile-time if you pass in a static string): 
<https://nitely.github.io/nim-regex/regex.html#re%2Cstaticstring>

Reply via email to