Actual String before the Scrap
Bibliographic data: US6079404 (A) ― 2000-06-27
String h1 = driver.findElement(By.xpath("//*[@id='hedvalue']/h1"))
.getText().replace("Bibliographic data:", "").trim();
so in h1 got the result for "US6079404 (A) ― 2000-06-27"
my Expected Result:
1.need to store only the value (US6079404 (A) in that h1 String (Note: length Dynamic not a constant) 2.2000-06-27 - how to store this value in another string
Sample o/p
h1 - US6079404 (A1)
h2 - 2000-06-27