0

Possible Duplicate:
translate Perl regex to .NET

I have a legacy application that uses Regular Expressions from Perl. The problem is that I need these Perl Regular Expressions to work in C# 3.

Background:

From what I can tell there are some major differences between Perl and C# Regular Expressions. There are too many to convert manually so I need a C# function to convert them to a DotNet Regex.

Something like this:

private string convertPerlRegex(string expression)
{
  //alter expression to DotNet friendly one
}

Question:

Is there a set of rules for converting Regular Expressions from Perl to DotNet? If so, what is the best way to convert them?

Or

Is there a better way to go about this - perhaps an open source library?

Community
  • 1
  • 1
Todd Moses
  • 10,919
  • 10
  • 45
  • 65

0 Answers0