I would like to match the following text sometext12345_text
using the below regex.
I'm using this in one of my selenium tests.
String expr = "//*[contains(@id, 'sometext[0-9]+_text')]";
driver.findElement(By.xpath(expr));
It doesn't seem to work though. Can somebody help?