Need a RegEx tool that suggests expressions based on selected text

Check out txt2re.

Using your sample text, with the relevant portions selected, and C# selected for the code to be generated, this is the result.

It takes some getting used to, but the basic steps are:

  1. Select the link for individual characters or whole words desired based on the colored boxes generated on the page.
  2. Select the desired language.
  3. The pattern is built up for you in the generated sample code.

I found this recently, uses genetic algorithm to find best matching pattern given a few examples that you generate yourself:

http://regex.inginf.units.it/

Tags:

Regex