Thank you both! Indeed, I simply wrote
= pathsplit.tail.replace(re"^[\!\+\-]+\s", "")
Run
without importing any regexp library explicitly, and it works fine.
glob anyways imports the regex module (
[https://github.com/nitely/nim-regex](https://github.com/nitely/nim-regex) ).
So you might as well just use that instead of importing nre.
nre will introduce a dependency on PCRE on your app, while the nim-regex module
won't.
one option is to write nre.Regex or nfatype.Regex
Let's imagine a code starting like this.
import os, times, glob, strutils
from nre import replace, Regex
proc decipher(file: string): string =
let pathsplit = splitPath(file)
let tail = pathsplit.tail.replace(Regex("^[\!\+\-]+\s"), "")
let head = p