5

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?

squirl
  • 1,636
  • 1
  • 16
  • 30

1 Answers1

6

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.

JAB
  • 20,783
  • 6
  • 71
  • 80
  • Thanks, `nre` worked perfectly and `pegs` look very interesting, I'll look into learning it. – squirl Jan 14 '16 at 23:53