Menu

zero-width positive lookbehind problem w/Perl

Help
JMarshall
2007-04-24
2013-04-22
  • JMarshall

    JMarshall - 2007-04-24

    Hello. I just installed eclipse and the QuickREx plug-in, and QuickREx does not appear to work correctly for zero-width positive and negative lookbehinds when using the Perl implementation. The lookaheads work correctly, though, and the lookbehinds work correctly for the Java and JRegex implementations.

    For example, when using this regex, "(?<=ANYTHING).*", I get the error message "Illegal Pattern: Sequence (?<...) not recognized near index 0". The negative lookbehind gets the same error message. However, when I run Perl code with this regex in eclipse, it works fine, so Perl seems to support it. 

    I'm new to eclipse and QuickREx and Perl, so maybe I'm missing something. I don't know if it matters, but the same behavior was exhibited for Java 1.5 and 1.6.

    So, any advice from anybody?

    Thanks. 

     
    • Bastian Bergerhoff

      Hello JMarshall,

      Thanks for the note. The problem is that QuickREx does not acutally run PERL-code but uses the Apache-ORO-implementation of a RegExp-Engine which may not be fully compatible. You can find more on the implementation at http://jakarta.apache.org/oro/index.html

      Cheers, Bastian

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.