Menu

startWith bug

Help
2002-09-02
2002-09-03
  • Aureliano Calvo

    Aureliano Calvo - 2002-09-02

    Hi!

    I'm trying to use jregex and I've found something that seems to be a bug.

    I'm using startWith combined with Named backreferences. And if I cut the reference, the startWith method returns false even when it should be true.
    Here is the code:

    Pattern p = new Pattern( "({ones}1*)a*{\\ones}" );
    String testCase = "11a1";
    System.err.println( testCase + " startsWith() for the      pattern:" + p.startsWith(testCase) );

    but, if I change the testCase to "11a11" or "11a" it works fine.

    Thank's in advance for your time,
    Aureliano.

     
    • Sergey A. Samokhodkin

      Hello, Aureliano!

      You've just discovered a bug.
      This startsWith() functionality is rather experimental,
      hence such a thing. Repost it to bug tracker.

      Best Regards
      Sergey

       
    • Aureliano Calvo

      Aureliano Calvo - 2002-09-03

      I''ve reported this bug to the bug tracker.

       

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.