Integrate RegexBuddy with Searching, Editing and Coding Tools

RegexBuddy is designed to be used as a companion to whatever software you use regular expressions with. Such applications include search tools, text editing and processing tools, programming and development tools, etc. Whenever you need to write or edit a regular expression while working with those applications, RegexBuddy pops up to provide assistance, and disappears when you finish editing the regex.

Without integrating RegexBuddy with your tools, this workflow takes many steps:

  1. In your tool, copy the regular expression to the clipboard.
  2. Start RegexBuddy via a desktop or start menu shortcut.
  3. Paste the regular expression into RegexBuddy, manually selecting the correct format.
  4. Edit the regular expression.
  5. Copy the regular expression from RegexBuddy to the clipboard, manually selecting the correct format.
  6. Close RegexBuddy.
  7. Paste the regular expression into your tool.

Basic Integration

Integrating RegexBuddy with your favorite tools can significantly speed up this workflow by automating most of the steps. The simplest form of integration is by starting RegexBuddy with certain command line parameters. This method is appropriate when you want to integrate RegexBuddy with a 3rd party tool. If the tool has the ability to run external applications, you can easily launch RegexBuddy from within the tool.

E.g. in Microsoft Visual Studio, you could select Tools|External Tools from the menu, and specify the following arguments: -getfromclipboard -putonclipboard -app vbnet20 -appname "Visual Studio". Use -app csharp20 instead of -app vbnet20 if you develop in C# rather than Visual Basic.

When adding RegexBuddy to Borland Delphi’s Tools menu, you can specify -getfromclipboard -putonclipboard -app delphixe4 -appname "Delphi XE4" for the parameters. This selects the regex flavor used by TRegEx.

This style of integration, which only takes a few minutes to implement, reduces the workflow to:

  1. In your tool, copy the regular expression to the clipboard.
  2. Start RegexBuddy from a menu item, button or keyboard shortcut in your tool.
  3. Edit the regular expression, which RegexBuddy automatically grabs from the clipboard, in the right format.
  4. Click the Send To button in RegexBuddy, which closes RegexBuddy and automatically puts the modified regex on the clipboard, in the right format.
  5. Paste the regular expression into your tool.

Though you still need to copy and paste the regular expression from and into your tool, the reduced workflow is a lot more convenient. You can launch RegexBuddy form within your tool, you no longer need to copy and paste the regex in RegexBuddy, and RegexBuddy automatically uses the correct regex flavor and string style for your tool.

Advanced Integration

Tighter integration is possible with tools that have a programming interface (API), and with software that you develop yourself. RegexBuddy provides a COM Automation interface, which you can easily import and call from any development tool or language that supports COM. The interface enables you to launch RegexBuddy, and send and receive regex actions in response to the user’s actions.

Except for actually editing the regular expression, the workflow is automated entirely:

  1. Start RegexBuddy from a menu item, button or keyboard shortcut in your tool. This automatically sends the regex to RegexBuddy.
  2. Edit the regular expression.
  3. Click the Send To button in RegexBuddy, which automatically updates the regex in your tool, and closes RegexBuddy.

If you are a software developer, and some of your products support regular expressions, make your customers happy and provide tight integration with RegexBuddy. Take a look at PowerGREP and EditPad Pro to see how convenient they make it to edit a regular expression with RegexBuddy.