News for hackers. Stuff that matters.
Re:I don't know Regex by BobTurbo on Tuesday September 03, 2013 @04:47AM (#6319800)
I would like to point out that I am actually the creator of this idea, and not the author. The author has created a variation in C#, that has some differences.

The original repository is at:

https://github.com/thebinarysearchtree/RegExpBuilder

I came up with this idea 2 years ago. Some differences I see between my idea and this c# implementation are:

Or() is confusing by itself. In mine, you pass in objects or strings, such as:

   var regex = new RegExpBuilder()
     .either(pattern1)
     .or(pattern2);

   var regex = new RegExpBuilder()
     .either("sometime")
     .or("soon")
     .or("never");
Also, all the special characters are escaped properly (\ is not escaped).

There are shortcuts - you don't have to do

   .exactly(1).of("hackernews")
you can just do:

   .then("hackernews");
In terms of differences between this and VerbalExpressions, verbal expressions is very limited. It cannot represent many quantifiers (eg, at least 3 of something), does not have decent ways to group subexpressions, and so on. It can only represent (in a practical way), about 0.000001 % of regular expressions, as opposed to RegExpBuilder.
Re:I don't know Regex by dyml on Tuesday September 03, 2013 @04:58AM (#6319833)
You have my support! I read a blogpost showing off your RegExpBuilder and I got inspired to create something similiar (as a chance to improve my regex and coding skills)in C#, although I have some things I would love to do differently than how your lib does it.

Thank you for a great library, after I have reached stable with this C# port, i'd like to create a TypeScript version. I hope you do not have anything against me writing spinnofs? :)