I want to use a regular expression that extracts a substring with the following properties in Java:
- Beginning of the substring begins with ‘WWW’
- The end of the substring is a colon ‘:’
I have some experience in SQL with using the Like clause such as:
Select field1 from A where field2 like '%[A-Z]'
So if I were using SQL I would code:
like '%WWW%:'
How can I start this in Java?
1 Answer