title: Checking if string starts with _ or a number (0-9)
body: <p>My code parses an XML file to look for IDs. But I only need to store the ones starting with <code>_</code> or some number.</p>
  
  <pre><code>Node legacyNode = (Node) xPath2.evaluate(elem, XPathConstants.NODE);
  Element legacyElem = (Element) legacyNode;
  if (legacyElem != null) {
    String legacyId = legacyNode.getFirstChild().getNodeValue();
    if (legacyId.matches("_(.*)")) {
      entry.setLegacyID(legacyId);
    }
  }
  </code></pre>
  
  <p><code>if (legacyId.matches("_(.*)"))</code>  checks for IDs starting with <code>_</code>. I don't know what I should change it to, so it checks for numbers too.</p>