Generating Regular Expression Code
RegexDesigner.NET provides a powerful code generation feature, which allows you to create code in either C# or VB.NET to create a Regex object, perform a Match, Replace or Split operation and then process the relevant results, including:
- Checking for a Match
- Returning the first Match
- Finding all Matches
- Finding all numbered and named groups
- Returning the Replace results string
- Finding all Split results
To generate regular expression code
- To open the Generate Code dialog, do one of the following:
- On the Regex menu, click Generate Code...
- On the toolbar, click the Generate Code button.
- Press CTRL-G.
- The dialog will open, and by default will generate C# code for a Match operation.
- Use the operation and language buttons to generate the desired code.
- Click Copy to select the generated code into the clipboard, or use the mouse to select and copy specific sections of code.
- Click Close once you have finished.
See Also
Compiling To Assemblies