Reply To: regular expressions

Product Compare Forums Multi-Edit Support regular expressions Reply To: regular expressions


In order, no the regex engine isn’t a plug-in, but is statically linked into the main Multi-Edit exeutable. And the reason for a “new” regex style is, to put it simply, power! If you’re familiar with any of the flavors of regexes common in the UNIX world, you’ll know what I mean. The two most common are Posix and Perl, and each has a number of sub-flavors. However, each also has a fairly common core functionality that doesn’t vary much between flavors.

Which of these you prefer will likely depend on what you’re used to. The current regex support in Multi-Edit is a very small core subset of Posix regexes, I believe. I’m more familiar with Perl regexes, so I’m pretty jazzed about having it in 9.1. Besides the fact that this will do away with some of the quirky behavior noted in the past in the existing regexes, it will make possible patterns that simply couldn’t be done before. To mention a couple of things that pop immediately to mind, full Perl regexes include operators for matching zero or one of a pattern, or from m to n repetitions of a pattern, and allow you to refer to previously-matched subexpressions later in the search pattern, and not just in the replace pattern, as in an expression like


which (in a simplistic way to illustrate the point) finds HTML tags and everything up to their closures.

For a quick, free rundown on what Perl regexes can do, grab the docs for ActivePerl at and check out the tutorials and reference material on regular expressions.