Java - Check if last characters in a string are numeric
<p>I'd like to know what I can use to check if the last characters in a string are numeric. For example for the ID: "S000123" .</p>

<p>I used the following to check if it starts with E, S or X.</p>

<pre><code>if(! id.startsWith("E") || ! id.startsWith("S") || ! id.startsWith("X")) {
    alertinputError("Incorrect format in the ID field", lineNum);
    return;
}
</code></pre>

<p>Thanks.</p>
