Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First, what your suggesting is possible and you certainly know your subject. You also know that the trade-off of not using back-referencing implementations is memory. If you control your environment enough this is likely a reasonable approach.</p> <p>The only thing I will comment on before continuing is that I would encourage you to question the choice of using RegEx. You are clearly more familiar with your specific problem and what your trying to solve so only you can answer the question. I don't think ANTLR would be a good alternative; however, A home-brew rules engine (if limited in scope) can be highly tuned to your specific needs. It all depends on your specific problem.</p> <p>For those reading this and 'missing the point', here is some background reading:</p> <ul> <li><a href="http://swtch.com/~rsc/regexp/regexp1.html" rel="noreferrer">Regular Expression Matching Can Be Simple And Fast</a></li> </ul> <p>From the same site, there are a number of implementations <a href="http://swtch.com/~rsc/regexp/" rel="noreferrer">linked on this page</a>. </p> <p>The gist of the entire discussion of the above article is that the best answer is to use both. To that end, the only widely used implementation I'm aware of is the one used by the TCL language. As I understand it was originally written by Henry Spencer and it employs this hybrid approach. There have been a few attempts at porting it to a c library, though I'm not aware of any that are in wide use. Walter Waldo's and <a href="http://www.straatinternet.com/opensource/hsre/" rel="noreferrer">Thomas Lackner's</a> are both mentioned and <a href="http://arglist.com/regex/" rel="noreferrer">linked here</a>. Also mentioned is the <a href="http://www.boost.org/doc/libs/1_41_0/libs/regex/doc/html/index.html" rel="noreferrer">boost library</a> though I'm not sure of the implementation. You can also look at the TCL code itself (linked from <a href="http://www.tcl.tk/" rel="noreferrer">their site</a>) and work from there.</p> <p>In short, I'd go with <a href="http://laurikari.net/tre/" rel="noreferrer">TRE</a> or <a href="http://swtch.com/plan9port/" rel="noreferrer">Plan 9</a> as these are both actively supported. </p> <p>Obviously none of these are C#/.Net and I'm not aware of one that is.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload