I've the following piece of code in the server folder of the module.
Pattern regex = Pattern.compile("/(B[A-Z0-9]{9})/");
Matcher matcher = regex.matcher(detailPageUrl);
But I still get the following errors:
[ERROR] Line 14: The import java.util.regex cannot be resolved
[ERROR] Line 15: The import java.util.regex cannot be resolved
[ERROR] Line 202: Pattern cannot be resolved to a type
[ERROR] Line 202: Pattern cannot be resolved
[ERROR] Line 203: Matcher cannot be resolved to a type
I've imported
import java.util.regex.Matcher;
import java.util.regex.Pattern;
in the code.
I thought that Regex will work on the server side. Why is this not working?