I have the string below:
Identification of the product - AZEC
How can I create a regex to exclude Identification of the product - and return only the string that comes next, in this case, AZEC
String str = "Identification of the product - AZEC";
System.out.println(str.split(" - ")[1]); // AZEC
I tried the one below and this seems to work:
(?m)(?<=\\bIdentification of the product - ).*$
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.