I've been looking into available libraries for string pattern matching and 
regular expressions, I found those:

  * re/nre: both come with Nim, but have dependency on pcre lib (quit large, 
requires .dll on win32)
  * peg: more of a parser, very powerful but cumbersome for quick string 
matching



Are there any other available options, preferably something small without 
external dependencies?

If not, I'm considering porting the Lua string pattern matching code [1] to 
Nim; it's pretty concise (approx 500 LOC), and handles about 99% of the 
matching/capturing cases I usually need in real life.

1\. 
[https://www.lua.org/manual/5.3/manual.html#6.4.1](https://www.lua.org/manual/5.3/manual.html#6.4.1)

Reply via email to