public static boolean validateRegEx(String pattern, String source) { RE r = new RE(pattern); if (r.match(source)) { return true; } else { return false; } }
Can you post the part of the code where you specify the regex string. Make sure not to include the slashes at the beginning and end .
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/7404416f-0a4e-46e4-bdf5-81293da5188c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public static final String DIRECTION_PATTERN = "/(?:# *).+/gi";
String direction = "Carrera 32 # 49-44";
boolean isDirectionComplete = Utilities.validateRegEx(Utilities.DIRECTION_PATTERN, direction);
direction = "Carrera 32";
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/dcf6150e-7d1a-40c9-9d18-dc3bb1c8e914%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/b7df5a3f-0402-4b28-9ae9-4022c8e4e5f4%40googlegroups.com.