title: Why isn't my code detecting the digit in my string. I'm using regex
body: <p>This is my code. I am looking for any digit in the word I chose, but when my finder looks through my word it returns false, but there clearly is a digit in my word.</p>
  
  <pre><code>package payrollprinter;
  
  import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  public class PayRollPrinter {
  
      /**
       * @param args the command line arguments
       */
      public static void main(String[] args) {
  
          String word = "7";
  
          // convert the string to a pattern
          Pattern wordPattern = Pattern.compile(word);
  
          // now I look for digits in my word
          Matcher finder = wordPattern.matcher("\\d");
          boolean b = finder.find();
          System.out.println(b);
      }
  
  }
  </code></pre>