Nim `Warning: re is deprecated`,用什么代替?

Nim `Warning: re is deprecated`, what to use instead?

我正在使用正则表达式编写一个 Nim 程序,它工作正常,除了在编译时,我收到以下错误消息:

Warning: re is deprecated [Deprecated]

我查看了 re 模块的文档,但没有提到创建正则表达式的新方法。

我的问题是,如果 re"regex" 构造函数被弃用,我 应该 使用什么?

来自the docs

Consider using the nre or pegs modules instead.

pegs is supposed to be more powerful than regular expressions and as such uses a different syntax from most regular expression engines; by contrast, nre 只是一个比 re.

更好的 PCRE 库包装器