Replace with more then one condition

Hi,

I saw some topics about this situations, but didn’t understand.

What I need is simple:

Replace some text.

When I search for only " - EST", with the node String.Replace, is easy.
But, i need to search for " - EST" and also " - FORRO", and maybe more conditions after.

Look the image below, " - FORRO" still there.

So, how to do this?

This seems to work.

image

4 Likes

You could also use Clockwork’s String.ReplaceRegularExpression node.

2 Likes

1 Like

Thanks all…

Giovanni, i didn’t know about the " | "… is like a separator?

image

Nick,

I was waiting your help hehehe.

I was looking for exactly what you did.

:metal:

I posted a new topic now… if possible, help me there!

In realy, is not this Nick, because it will not work with a part of string…

But, no problem… i got it according others!

Yup, you’re right. I got lucky with the lacing in my example.

Hi Daniel,

In the Regular Expression language | it’s the OR operator. More info here:
http://www.rexegg.com/regex-quickstart.html#logic

image

And this is the website that Andreas Dieckmann refers to:
https://ironpython-test.readthedocs.io/en/latest/howto/regex.html

1 Like