i'm working in the last part of my project in java i used pattern regExp for email and password verification and now i tried to use them in codenameone but it didn't work maybe it's because of the syntaxe or the import i searched but i found noting
here's the pattern i declared
public static final Pattern VALID_EMAIL_ADDRESS_REGEX = Pattern.compile("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$", Pattern.CASE_INSENSITIVE);
public static final Pattern VALID_PASSWORD_REGEX = Pattern.compile("^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#&()–[{}]:;',?/*~$^+=<>]).{8,20}$", Pattern.CASE_INSENSITIVE);
and i called it like this
import static edu.esprit.pidev.utils.Statics.VALID_EMAIL_ADDRESS_REGEX;
import static edu.esprit.pidev.utils.Statics.VALID_PASSWORD_REGEX;
import java.util.regex.Matcher;
public class Validator {
public Validator() {
}
public boolean testEmail(String mail) {
Matcher matcher = VALID_EMAIL_ADDRESS_REGEX.matcher(mail);
return matcher.find();
}
public boolean testPassword(String password) {
Matcher matcher = VALID_PASSWORD_REGEX.matcher(password);
return matcher.find();
}
but when i run the project here' sthe problem
error: cannot find symbol
public static final Pattern VALID_NAME_REGEX = Pattern.compile("^[a-zA-Z]{3,30}$", Pattern.CASE_INSENSITIVE);
symbol: variable Pattern
location: class Statics
please i'm really stuck i need to fix this tonight cause i present my project in few hours