Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsJava via Epsilon Tools
https://www.eclipse.org/forums/index.php/mv/msg/182712/579493/#msg_579493
I'm trying to execute some regular expression searches in a
transformation. The Java I need to execute uses the
Java.utils.regex.Pattern and Java.utils.regex.Matcher. Dimtitris kindly
pointed me to the Epsilon Tools documentation and I can follow the JFrame
example. However from what I can tell there is no default constructor for
Pattern, which is what I believe to be causing me the problems.
Pattern is typically called in Java by:
Pattern p = Pattern.compile('regex Srring');
I have tried:
# var pattern : new Native('java.util.regex.Pattern') :=
pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern') :=
Pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern') :=
java.util.regex.Pattern.compile('Section ((\\d)[(\\.\\d)]*)');
# var pattern : new Native('java.util.regex.Pattern');
All of which result in an EXCEPTION: Internal error:
java.lang.InstantiationException: java.util.regex.Pattern