Page 1 of 1

Filter out specific characters in regular expressions.

Posted: January 14th, 2018, 6:19 pm
by kyriakos876
Hello, I'm trying to filter out the spaces from the outcome of my RegExp but I don't quite get the syntax.
At the moment I have this:

(?siU)<em>(.*)</em>

And the result, when parsed, is like
text1 text2 text3 text4

and I would like to just have it return

"text1text2text3text4"

Could somebody help me?

-Thanks.

Re: Filter out specific characters in regular expressions.

Posted: January 14th, 2018, 6:45 pm
by balala
kyriakos876 wrote:And the result, when parsed, is like
text1 text2 text3 text4

and I would like to just have it return

"text1text2text3text4"
Just add the following two options to the measure which returns the text1 text2 text3 text4 string:

Code: Select all

RegExpSubstitute=1
Substitute="\s+":""

Re: Filter out specific characters in regular expressions.

Posted: January 14th, 2018, 6:50 pm
by kyriakos876
balala wrote:Just add the following two options to the measure which returns the text1 text2 text3 text4 string:

Code: Select all

RegExpSubstitute=1
Substitute="\s+":""
Thanks, that's what I needed.

Re: Filter out specific characters in regular expressions.

Posted: January 14th, 2018, 6:56 pm
by balala
Glad to help.