Home All Groups Group Topic Archive Search About

Extending .net Regular Expressions

Author
8 Apr 2006 4:31 PM
rchurchill
Does anyone know if the .net regex engine can be extended in any way.
For example I'd like to be able to create my own metacharacters which
mean something for certain subjects.

Author
9 Apr 2006 2:25 PM
Nick Hounsome
<rchurch***@gmail.com> wrote in message
news:1144513897.965591.108960@g10g2000cwb.googlegroups.com...
> Does anyone know if the .net regex engine can be extended in any way.
> For example I'd like to be able to create my own metacharacters which
> mean something for certain subjects.

Have you considered simply pre-processing your expression into a standard
one? (using regular expressions of course)
Author
10 Apr 2006 5:33 PM
Mike Blake-Knox
In article <1144513897.965591.108***@g10g2000cwb.googlegroups.com>, 
wrote:
> Does anyone know if the .net regex engine can be extended in any way.
> For example I'd like to be able to create my own metacharacters which
> mean something for certain subjects.

You can use MatchEvaluator to some kinds of extensions. For instance,
I'm using a MatchEvaluator to allow the use of \x in a replacement
string to insert the specified character into the text resulting from a
replacement.

Mike

AddThis Social Bookmark Button