in reply to Regular Expression GUI?

The pretty nifty (and free as in beer/cost) editor JEdit has a RETest plugin that works pretty well. Despite what you may think from the name, it's an all-purpose editor, not just a Java editor.

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
JEdit's RE Tester. (boo)
by boo_radley (Parson) on Apr 10, 2002 at 05:27 UTC
    JEdit is a nifty editor, but the engine that JEdit's regex tool (RE Tester) employs has several differences from perl's -- in some cases, this makes it impossible (or just annoying :) ) to compare RETester's results with perl's interpretation of a given regex.

    Here's some differences, right from the gnu.regexp documentation, included with the plugin :
    Unsupported Syntax Some flavors of regular expression utilities support additional escape sequences, and this is not meant to be an exhaustive list. In the future, gnu.regexp may support some or all of the following:

    (?:...) pure grouping operator (Perl5)
    (?=...) positive lookahead operator (Perl5)
    (?!...) negative lookahead operator (Perl5)
    (?#...) embedded comment (Perl5)
    (?mods) inlined compilation/execution modifiers (Perl5)
    \G end of previous match (Perl5)
    \b word break positional anchor (Perl5)
    \B non-word break positional anchor (Perl5)
    \< start of word positional anchor (egrep)
    \> end of word positional anchor (egrep)
    [.symbol.] collating symbol in class expression (POSIX)
    [=class=] equivalence class in class expression (POSIX)


    Additionally, I've seen it act rather odd when using .* without an EOL anchor.

      Very true. However, I'd imagine the plugin will be modified in the future to use the JDK 1.4 built-in java.util.regex instead of the external gnu.regexp library. The built-in library includes (according to the 4th ed. of Java in a Nutshell):

      (?:...) (?=...) (?!...) (?<flags>:...) \G \b \B

      Since it's open-source, I'd imagine this would get done sooner rather than later :-)

      Chris
      M-x auto-bs-mode

        jEdit requires only JDK 1.3, so the likelihood of it switching from gnu.regexp to java.util.regex in the near term is very small. Even just switching the plugin is unlikely, since very few plugins are JDK 1.4 only (WheelMouse is the only one IIRC). However, I believe that for jEdit 4.0final (to be released within days) Slava Pestov has either upgraded to a new gnu.regexp that fixes the .* problems or he has patched jEdit's copy of gnu.regexp to fix them himself; regardless, I recall seeing a changelog entry recently noting that some .*-related bugs have been addressed.