Index: src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java
===================================================================
--- src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java	(revision 1138878)
+++ src/plugin/urlnormalizer-regex/src/java/org/apache/nutch/net/urlnormalizer/regex/RegexURLNormalizer.java	(working copy)
@@ -44,8 +44,9 @@
 import javax.xml.parsers.*;
 import org.w3c.dom.*;
 import org.xml.sax.InputSource;
-import org.apache.oro.text.regex.*;
 
+import java.util.regex.*;
+
 /**
  * Allows users to do regex substitutions on all/any URLs that are encountered,
  * which is useful for stripping session IDs from URLs.
@@ -69,7 +70,7 @@
    * string.
    */
   private static class Rule {
-    public Perl5Pattern pattern;
+    public Pattern pattern;
 
     public String substitution;
   }
@@ -78,8 +79,6 @@
   
   private static final List EMPTY_RULES = Collections.EMPTY_LIST;
 
-  private PatternMatcher matcher = new Perl5Matcher();
-
   /**
    * The default constructor which is called from UrlNormalizerFactory
    * (normalizerClass.newInstance()) in method: getNormalizer()*
@@ -97,7 +96,7 @@
    * configuration files for it.
    */
   public RegexURLNormalizer(Configuration conf, String filename)
-          throws IOException, MalformedPatternException {
+          throws IOException, PatternSyntaxException {
     super(conf);
     List rules = readConfigurationFile(filename);
     if (rules != null)
@@ -176,9 +175,10 @@
     Iterator i = curRules.iterator();
     while (i.hasNext()) {
       Rule r = (Rule) i.next();
-      urlString = Util.substitute(matcher, r.pattern, new Perl5Substitution(
-              r.substitution), urlString, Util.SUBSTITUTE_ALL); // actual
-                                                                // substitution
+
+      Matcher matcher = r.pattern.matcher(urlString);
+
+      urlString = matcher.replaceAll(r.substitution);
     }
     return urlString;
   }
@@ -203,7 +203,7 @@
   }
   
   private List readConfiguration(Reader reader) {
-    Perl5Compiler compiler = new Perl5Compiler();
+    //Perl5Compiler compiler = new Perl5Compiler();
     List rules = new ArrayList();
     try {
 
@@ -242,7 +242,7 @@
         }
         if (patternValue != null && subValue != null) {
           Rule rule = new Rule();
-          rule.pattern = (Perl5Pattern) compiler.compile(patternValue);
+          rule.pattern = Pattern.compile(patternValue);
           rule.substitution = subValue;
           rules.add(rule);
         }
@@ -258,7 +258,7 @@
   }
 
   /** Spits out patterns and substitutions that are in the configuration file. */
-  public static void main(String args[]) throws MalformedPatternException,
+  public static void main(String args[]) throws PatternSyntaxException,
           IOException {
     RegexURLNormalizer normalizer = new RegexURLNormalizer();
     normalizer.setConf(NutchConfiguration.create());
@@ -266,7 +266,7 @@
     System.out.println("* Rules for 'DEFAULT' scope:");
     while (i.hasNext()) {
       Rule r = (Rule) i.next();
-      System.out.print("  " + r.pattern.getPattern() + " -> ");
+      System.out.print("  " + r.pattern.pattern() + " -> ");
       System.out.println(r.substitution);
     }
     // load the scope
@@ -282,7 +282,7 @@
         i = ((List)normalizer.scopedRules.get(scope)).iterator();
         while (i.hasNext()) {
           Rule r = (Rule) i.next();
-          System.out.print("  " + r.pattern.getPattern() + " -> ");
+          System.out.print("  " + r.pattern.pattern() + " -> ");
           System.out.println(r.substitution);
         }
       }
