Generate new attribute using nominal regex
I work with Excel-file, which contains several sentences. I would like to generate new attribute (I use "Generate Attribute" operator), which returns (“true or false”) if the sentence contains the chain of numbers with white spaces between them (e.g. 234 45 56 or 2.3 34 56 5.6 or 2,345 56,67 34 2013 or 23% 34% 56%..). So a chain can contain different numbers, e.g. with percent or decimal points) and can be of different length. I have used the function “match nominal regex” (match(sentences,"\d+\s+\d) to do this. However, I faced the problem that Rapidminer does not recognize the escape (\) character. How do I change my Regex to make it work? Besides I would appreciate some help on my regex, I am not sure how to capture the decimal values.
Answers
I think what you are saying is that you want to generate any number of new attributes based on splitting your data by whitespace.
For this use the Split operator. Not sure your meaning when you say that escape characters such as \s or \W are not recognised. Try this example below. I went for the simple RegEx of ([\s|\W]+) as it does what you describe you need without much fuss.