[Ironruby-core] Match operator

John Lam (DLR) jflam at microsoft.com
Mon Oct 15 12:26:14 EDT 2007

Tomas Matousek:
> We don't support regular expressions yet. Coming soon. Please, be
> patient.

I would say that we *barely* support regex today. There is a transformation implemented to allow regexp = /some .net regex expression/

Curt Hagenlocher:
> Hmm.. I had assumed that the parser was recognizing this as
> <value><equals><binary negation><value>.  I was wrong, and these
> symbols are actually defined as MATCH and NMATCH in the grammar.
> Their implementation, however, is commented out:
> | arg MATCH arg
> {
> //$$ = new MatchExpression($1, $3, @$); }
> | arg NMATCH arg
> {
> //$$ = new NotExpression(new MatchExpression($1, $3, @$), @$); }
> There does not actually appear to be any implementation of the
> MatchExpression class.

This is where you would need to look to start work on implementing (at the very least) a .NET implementation of regex. Another thing that you could consider doing is defining a regex .NET interface so that we can swap out the interim .NET regex implementation for a Ruby-compatible regex implementation down the road.


More information about the Ironruby-core mailing list