[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2t] Re: Check/Xtend: Regular Expression syntax
|
Unfortunately, you have to double the backslashes.
So it is :
name.matches("\\w*");
Regards,
Sven
Hauke Fuhrmann schrieb:
Dear Xtend folks,
could you point me to some reference on the Syntax for regular
expressions for Strings in Xtend and Check?
I want to use e.g.
name.matches("MyRegex");
Where MyRegex is a regular expression. I tried to follow the Java Syntax
(http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html ) like
name.matches("\w*");
to make sure that something only consists of word characters.
Unfortunately the syntax seems to be different.
Google didn't show me the way and the old oAW document also not
(http://www.openarchitectureware.org/pub/documentation/4.3.1/html/contents/core_reference.html#r10_expressions_language
)
Cheers,
Hauke
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com