java-regex: How to write regular expression for two digit numbers <p>I have password field with ID locator "j_idt90". However the ID is dynamic and the two digits in the preceeding changes everytime login page loads.</p> <p>Iam using automation to capture this field and used below regular expression but it is failing. Do, let me know where I'm failing to identify the element.</p> <p>Reg Exp - <code>driver.findElement(By.id("j_idt[0-9]{2}"));</code></p>