Can't find a RegEx expression that matches the wanted text

I’ve been trying for 2 days now and I’ve done robots that required very similar things but I can’t do it for this one I don’t know why. Any kind of help is appreciated!

PortNumber 587 PortNumber

The PortNumber is between tags in a config file

Hi,

Can you clarify what is input and expected output?
And also Which part is fixed string?

Regards,

hi @rodrigo.simao

You can use SplitFunction if you know what keywords are to be used.

for Eg:
strData= PortNumber 587 PortNumber , and you need the portnumber from between those two

portNumber= strData.Split({“PortNumber”},StringSplitOptions.None)(1).Trim
in this case only one condition would be able to give you the answer.

But Generic example:

strData.Split({“FirstWord”},StringSplitOptions.None)(1).Split({“SecondWord”},StringSplitOptions.None)(0)

Thanks for you reply! Meanwhile I got the answer. :slight_smile:

Thanks for your reply! Meanwhile I got the answer. :slight_smile: