title: Java Regular Expression throwing error
body: <p>I am trying to capture a certain number chunk from within a text. Suppose the text is <strong>Kane is 12345 feet high</strong>. I want to capture <code>12345</code>. I am trying to use this:</p>
  
  <pre><code>import java.util.regex.Pattern; 
  import java.util.regex.Matcher; 
  String text = "Kane is 12345 feet high";
  Pattern p = Pattern.compile("Kane is (\\d+) feet high");
  Matcher m = p.matcher(text);
  String s0 = m.group(0);
  </code></pre>
  
  <p>However I am getting a <code>Match not found</code> error. What am I doing wrong here? I mean, in Perl, this perfectly prints out <code>12345</code>:</p>
  
  <pre><code>$foo = "Kane is 12345 feet high";
  $foo =~ /Kane is (\d+) feet high/;
  print $1;
  </code></pre>