Easily Use Regular Expressions with Visual Basic

Visual Basic.NET (Visual Basic 2003 and later)

Microsoft’s .NET provides a solid implementation of regular expressions. The original .NET Framework, .NET Core, and .NET 7.0 all implement the same regex flavor. You can use it in your VB.NET application by importing the System.Text.RegularExpressions namespace. RegexBuddy makes it very easy to use the power of regexes in your Visual Basic source code.

Visual Basic 6

If you’re still relying on good old VB 6, RegexBuddy will help you out just the same. VB 6 applications cannot use the .NET regex classes, but can use the VBScript RegExp object. This object is available on any modern Windows PC, as it’s part of Internet Explorer 5.5 and later. It implements JavaScript regular expressions. But it is not fully compliant with the ECMAScript standard and thus not fully compatible with modern browsers. Fortunately, RegexBuddy is aware of all the differences. You can compare your regex and RegexBuddy will tell you if it may behave differently with VBScript that with JavaScript in modern browsers.

See How Easy Coding with Regexes Can Be

First, use RegexBuddy to define a regex or retrieve a regexp saved in a RegexBuddy library. Rely on RegexBuddy’s clear regex analysis, which is constantly updated as you build the pattern, rather than dealing with the cryptic regex syntax on your own. Detailed help on that syntax is always only a click away.

If you copied a regex written for another programming language, select the original language, and then convert the regex to the specific version of Visual Basic you’re using.

If you created a new regular expression, test and debug it in RegexBuddy before using it in your VB source code. Test each regex in RegexBuddy’s safe sandbox without risking precious data. Quickly apply the regex to a wide variety of input and sample data, without having to produce that input through your application.

Finally, let RegexBuddy generate a source code snippet that you can copy and paste directly into Visual Studio or whichever IDE or VB code editor you use. Just choose what you want to use the regex for, and a fully functional code snippet is ready. You can change the names of variables and parameters to suit your naming style or the current situation, which RegexBuddy automatically remembers.

While the .NET Regex classes and the VBScript RegExp object are quite different, you don’t have to remember the details of how to use either of them. Just tell RegexBuddy what you want to do, and you will get the proper VB.NET or VB6 code straight away. Anything can be done: testing a string for a match, extracting search matches, validating input, search-and-replace, splitting a string, etc. Choose whether to create a reusable regex object for best runtime performance, or whether to use a one-line convenience function for maximum source code readability.

RegexBuddy also has specific support for the Visual Studio 2012 (and later) IDE. Since 2012 the IDE also uses the .NET regex flavor. But it does not support any regex options other than case insensitivity, which is on rather than off by default. RegexBuddy takes care even of such minor details. Create and test your regex in RegexBuddy with the same limitations as the IDE, or create it for VB.NET first and then have RegexBuddy convert it for use in the Visual Studio IDE.

Let RegexBuddy Make Regex Easy for You

      
Only US$ 39.95
Windows XP, Vista, 7, 8, 8.1, 10, and 11
100% satisfied or money back




“RegexBuddy is a great tool! I’ve always shied away from using regexes because they are so hard to create and test, but with RegexBuddy I’ve been able to do some things that would have taken hundreds of hours of programming in VB.NET, if I could have done them at all.

“RegexBuddy has completely changed my feeling about regexes and has saved me huge amounts of time. I like your price structure, but this tool is worth much more than what I paid for it.”
— David Shannon
  13 December 2004, Arizona, USA