This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Create an ArrayList in Java and compile the regular expression using Pattern. Match the given string with the regular expression. Find the substring from the first index of the match result to the last index of the match result and add this substring to the list. See an example Why you need motorcycle- TPMS here.