Re: Conflict of nfatype.Regex and nre.Regex

2020-05-16 Thread svtz
Thank you both! Indeed, I simply wrote = pathsplit.tail.replace(re"^[\!\+\-]+\s", "") Run without importing any regexp library explicitly, and it works fine.

Re: Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread kaushalmodi
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.

Re: Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread enthus1ast
one option is to write nre.Regex or nfatype.Regex

Conflict of nfatype.Regex and nre.Regex

2020-05-15 Thread svtz
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