Hello community! I want to clarify for myself and future programmers, what standard regex library should we use now?
I found two discussions about future of both re and nre .
I'm a bit scared that nre can be removed. Currently i use re for my projects, but getting group's from match doesn't work at all and i think about switching to nre instead.
Only issue on github confuses me. What if year later my code will not compile anymore and i would have to rewrite it again?
We could maybe adopt nim-regex into the stdlib and deprecate both re and nre...
Does this mean that the plan is to remove nre in the future?
If you feel out of the loop, the "real" plans that have some chance of being done are tracked here: https://github.com/nim-lang/RFCs/issues
import re,nre
let
re1 = re.re"dd"
re2 = nre.re"dd"
echo re.match("ugknbfddgicrmopn",re1)
echo nre.contains("ugknbfddgicrmopn",re2)
false
true
Of course, could be I just don't know nim and/or regex.