for Visual Studio 2022


Latest Version

VSRegex is a Visual Studio extension for creating and testing regualar expressions.

In case you are encountering a problem or need to discuss something then you are welcome to contact us by email: support@lonestarsoftworx.com

***** Looking for Beta Testers *****

We are always looking for beta testers. If you would like to be considered, please send an e-mail to beta.testing@lonestarsoftworx.com. You will receive an Amazon gift card and if you have not purchased the software, you will also get a free license.


The license for VSRegex is perpetual which means that the license will never expire and will work for subsequent versions. Includes support that never expires.

The license is per developer and one machine. Multiple machines require multiple licenses.

License cost for VSRegex is as follows:

Individual License
Registration on a device (for private or commercial use)
Site License
Suitable for a single location of a company, or for companies with only one location
Company License
Suitable for larger companies and organizations

Please contact sales@lonestarsoftworx.com for additional information regarding licensing.


To test or create a new Regular Expression, go to Tools > VSRegex > New Regex.

Tools Menu - VSRegex Menu

This will display the VSRegex window.

Tools Menu - VSRegex Menu

1 New Tab
Creates a new VSRegex tab.
2 Match
Searches the input string for the first occurrence of the specified regular expression.
3 Replace
In a specified input string, replaces all substrings that match a specified regular expression.
4 Split
Splits an input string into an array of substrings at the positions defined by a specified regular expression pattern.
5 Output Mode
  • Default:   Displays the results as text.
  • C#:          Generates sample code in C#.
  • VB.Net:   Generates sample code in VB.Net.
6 Run
Runs the regular expression.
7 Autorun
Automatically executes the regular expression whenever any field or option is updated.
8 Save
Saves your regular expression to a file. If it’s new, you will be prompted to select the location and enter the file name.
9 Save As...
Saves your regular expression file with a different name. You will be prompted to select the location and enter the file name.
10 Open
Opens an existing VSRegex file. You will be prompted to select the location and the file.
11 Optimize
Shows only the first 1000 characters and adds a warning to the end of the output.
12 Reset
Resets the fields and options.
13 Help
Launches the VSRegex web page.
14 Expression
Enter regular expression pattern here.
15 Replacement
Enter the replacement string here.
16 Options
Modifies the aspects of default regular expression behavior by selecting these options.
17 Input
The string to perform the regular expression on.
18 Output
Displays the results of the regular expression pattern.
19 Status Bar
Displays the number of matches and the status of the various options that have been selected.

Hot Keys
Action Hotkey
 Run CTRL+P 
 Save  CTRL+S
Autorun   CTRL+SHIFT+A
 Close Tab  CTRL+W

Opening VSRegex files

To open a VSRegex file, you can use any of the options below.

You can drag and drop VSRegex files directly onto a tab, selecting one from the Recent Files list on the VSRegex menu, or loading the file using the toolbar on a tab.

To drag and drop, select the file you want in File Explorer, and keeping the left mouse button pressed, drag the file onto the tab.

To select a file from the Recent Files menu, go to Tools --> VSRegex --> Recent Files and click on the file.

Tools Menu - VSRegex Recent Files

You can modify the number of items that the Recent Files list will hold. Go to Tools --> Options --> VSRegex --> General and enter a number from 1 to 10.

Tools Menu - Options - VSRegex General Options

To load a file, click on the Folder icon Tools Menu - VSRegex Toolbar Open File located on the toolbar. Clicking this will bring up the file selection dialog. Navigate to the path where the file is located and select it. Click the Open button.

VSRegex Load File Dialog
Saving VSRegex files

There are three ways to save a VSRegex file.

The first one is to click the Save icon Tools Menu - VSRegex Toolbar Save on a toolbar. If this is a new file, the Save VSRegex File As dialog will appear. Otherwise, the file will just be saved without showing the Save As file dialog.

The second way to save is to click the Save As icon Tools Menu - VSRegex Toolbar Save As on the toolbar. This wil display the Save VSRegex File As dialog. Click the Save button.

Tools Menu - VSRegex Main Window Close Tabs

The third way is to right-click on a tab. If you select any of the close operations, any modified file will be listed on the Save items dialog. You can either choose Save, Don't Save, or cancel which will stop the closing action.

Tools Menu - VSRegex Main Window Close Tabs

Tools Menu - VSRegex Save Modified Files

Reporting Issues

To report an issue, click the Report a Problem a Problem menu command.

Tools Menu - VSRegex Menu - Report a Problem

Leaving Feedback

To leave a suggestion or feedback on how we can improve VSRegex or to rate VSRegex, click the Leave Feedback menu item.

Tools Menu - VSRegex Menu - Leave Feedback

Regular Expression Reference

.NET Regular Expressions

Regular Expression Language - Quick Reference

Regular Expression Language - Quick Reference 2

Release Notes – 05/10/2022

  • NEW Drag and drop VSRegex files to load them.
  • NEW The option to save a modified file when closing a tab or tabs.
  • NEW Regular Expressions can be outputted to VB.Net.
  • NEW An indicator appears when a file has been modified.
  • NEW A list of recently used files now appears on the VSRegex menu.
  • NEW The number of items that will display on the recently used files list can be specified in the options.
  • IMPROVED Regular expression options are grouped better. – 03/29/2022

  • FIXED Reporting of Problems and Feedback was not working. – 03/27/2022

  • Initial Release