Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm writing a Nim program using regexes, which works fine, except that when I compile, I get this error message:

Warning: re is deprecated [Deprecated]

I've looked in the documentation for the re module, but there's no mention of a new way to create regexes.

My question is, if the re"regex" constructor is deprecated, what should I use?

like image 527
squirl Avatar asked Jan 14 '16 22:01

squirl


1 Answers

From 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 is just a better wrapper around the PCRE library than re.

like image 90
JAB Avatar answered Nov 05 '22 16:11

JAB