RapidMiner

Regular expressions?

SOLVED
Contributor II lists
Contributor II

Re: Regular expressions?

I thought so...but needle is not in $1-$3.

Highlighted
RM Staff
RM Staff

Re: Regular expressions?

Hi,

 

how about the following:

 

.*(hay) ([^h]\S*) (hay).*

Explanation:

The second capturing group (reflected by $2) starts with a character which is not h and uses only non-whitespace (blanks) characters. It therefore only matches "needle".

A shorter version would be .* ([^h]\S*) .* which can be reflected by $1.

 

Hope this helps,

Edin

 

image.png

Contributor II lists
Contributor II

Re: Regular expressions?

@Edin_Klapic

 

That's interesting.

 

On this way replacing makes sense, though it's no real matching and it's some how not so flexible if I have different longer text. Anyways, now I understand the box "Replacement (for preview only)". 

 

Thank you very much edin, I will play with it.

 

Meanwhile I started a new thread here...

 

http://community.rapidminer.com/t5/RapidMiner-Studio/Regular-Expressions-II-Needle-I-need-You/m-p/37...