title: Difference between java.util.regex and org.apache.regexp?
body: <p>I tried this code:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
          String regexp = "[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)*(\\.)[a-zA-Z]+";    
  
          String text1 = "my.name-here@my.domain-here.ext";
          String text2 = "my.name-here@m@y.domain-here.ext";
          String text3 = "@domain-here.ext";
          String text4 = "my.name-here@";
          String text5 = "my.name-here@domain-here";
          String text6 = ".my.name-here@my.domain-here.ext";
          String text7 = "my.name-here.@my.domain-here.ext";
          String text8 = "my.name-here@.my.domain-here.ext";
          String text9 = "my.name-here@my.domain-here.ext.";
          String text10 = "my.na me-here@my.domain-here.ext";
          String text11 = "my.name-here@my.dom ain-here.ext";
          String text12 = "my..name-here@my.domain-here.ext";
          String text13 = "my.name-here@my..domain-here.ext";
  
          RE re = new RE(regexp);
          System.out.println(re.match(text1));
          System.out.println(re.match(text2));
          System.out.println(re.match(text3));
          System.out.println(re.match(text4));
          System.out.println(re.match(text5));
          System.out.println(re.match(text6));
          System.out.println(re.match(text7));
          System.out.println(re.match(text8));
          System.out.println(re.match(text9));
          System.out.println(re.match(text10));
          System.out.println(re.match(text11));
          System.out.println(re.match(text12));
          System.out.println(re.match(text13));
  
          System.out.println(Pattern.matches(regexp, text1));
          System.out.println(Pattern.matches(regexp, text2));
          System.out.println(Pattern.matches(regexp, text3));
          System.out.println(Pattern.matches(regexp, text4));
          System.out.println(Pattern.matches(regexp, text5));
          System.out.println(Pattern.matches(regexp, text6));
          System.out.println(Pattern.matches(regexp, text7));
          System.out.println(Pattern.matches(regexp, text8));
          System.out.println(Pattern.matches(regexp, text9));
          System.out.println(Pattern.matches(regexp, text10));
          System.out.println(Pattern.matches(regexp, text11));
          System.out.println(Pattern.matches(regexp, text12));
          System.out.println(Pattern.matches(regexp, text13));
      }
  </code></pre>
  
  <p>Only the first one must be right but... <code>org.apache.regexp.RE</code> does something wrong. Any solution? Thanks a lot. I have to do it with <code>org.apache.regexp.RE</code> obligatory.</p>
  
  <p><strong>Update:</strong> Pattern do matches right (all false except the first one), RE say someone String are true but they isn't.</p>