Skip to content
Advertisement

regEx codenameon

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

JavaScript

and i called it like this

JavaScript

but when i run the project here’ sthe problem

JavaScript

please i’m really stuck i need to fix this tonight cause i present my project in few hours

Advertisement

Answer

You imported the incorrect package probably due to IDE completion. Notice that this is less likely to happen if you use the newer Maven project structures. See this JavaDoc: https://www.codenameone.com/javadoc/com/codename1/util/regex/package-summary.html

You need to import the classes from com.codename1.util.regex for pattern matching in Codename One.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement