Index: src/java/org/apache/nutch/parse/OutlinkExtractor.java
===================================================================
--- src/java/org/apache/nutch/parse/OutlinkExtractor.java	(revision 1140560)
+++ src/java/org/apache/nutch/parse/OutlinkExtractor.java	(working copy)
@@ -25,13 +25,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import org.apache.hadoop.conf.Configuration;
-import org.apache.oro.text.regex.MatchResult;
-import org.apache.oro.text.regex.Pattern;
-import org.apache.oro.text.regex.PatternCompiler;
-import org.apache.oro.text.regex.PatternMatcher;
-import org.apache.oro.text.regex.PatternMatcherInput;
-import org.apache.oro.text.regex.Perl5Compiler;
-import org.apache.oro.text.regex.Perl5Matcher;
+import java.util.regex.*;
 
 /**
  * Extractor to extract {@link org.apache.nutch.parse.Outlink}s 
@@ -75,30 +69,31 @@
   /**
    * Extracts <code>Outlink</code> from given plain text and adds anchor
    * to the extracted <code>Outlink</code>s
-   * 
+   *
    * @param plainText the plain text from wich URLs should be extracted.
    * @param anchor    the anchor of the url
-   * 
+   *
    * @return Array of <code>Outlink</code>s within found in plainText
    */
   public static Outlink[] getOutlinks(final String plainText, String anchor, Configuration conf) {
+
     long start = System.currentTimeMillis();
     final List<Outlink> outlinks = new ArrayList<Outlink>();
 
+    // Test fails without this check
+    if (plainText == null)
+    {
+      return new Outlink[0];
+    }
+
     try {
-      final PatternCompiler cp = new Perl5Compiler();
-      final Pattern pattern = cp.compile(URL_PATTERN,
-          Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.READ_ONLY_MASK
-              | Perl5Compiler.MULTILINE_MASK);
-      final PatternMatcher matcher = new Perl5Matcher();
+      Pattern pattern = Pattern.compile(URL_PATTERN, Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
+      Matcher matcher = pattern.matcher(plainText);
 
-      final PatternMatcherInput input = new PatternMatcherInput(plainText);
-
-      MatchResult result;
       String url;
 
-      //loop the matches
-      while (matcher.contains(input, pattern)) {
+      // Check if we found matches
+      while (matcher.find()) {
         // if this is taking too long, stop matching
         //   (SHOULD really check cpu time used so that heavily loaded systems
         //   do not unnecessarily hit this limit.)
@@ -108,8 +103,9 @@
           }
           break;
         }
-        result = matcher.getMatch();
-        url = result.group(0);
+
+        url = matcher.group(0);
+
         try {
           outlinks.add(new Outlink(url, anchor));
         } catch (MalformedURLException mue) {
