Substring don't work properly


#1

Substring function don’t work prperly when you use “empty” as final of a line:

Extract text after: =

Extract text before: empty

Never finds anythig.


#2

@jgarci7,

it is not clear from your description what is your initial string and what you want to do. Please add more details


#3

Hi,
I have a string as:

alias.user.name=chain

Then , I want to obtain the substring “chain” and I’m configuring the función is this way:

Extract text after: =
Extract text before: empty

In this way substring return nothing.

Thanks.


#4

It works seamlessly in 1.1.4


#5

Hi again.

I’ve changed the parameter: Extract text before:empty: instead empty ive written : “\r\n”.

This Works fine!!

Thanks.


#6

Bad news, I’ve confused: “\r\n” don’t work.

I’m using v 1.1.4 too.

Please try with two lines:

alias.user.name=chain
alias.user.pass=XXX

And you have to obtain the same string: “chain”. I’v had this two lines in a txt file.

CTRL-A
CTRL-C
Clipboard > variable text
substring

Many thanks


#7

@jgarci7
after Ctr+A you have two lines in the Clipboard. Don’t copy the second line. Use Shift+End for selection.


#8

Thank you.

it’s a good idea, however, the string “.name=” can be in anywhere in the file , not no necesarly at first line.


#9

@jgarci7,

If your clipboard contents is a mult-line string, you can parse it to a List variable (just provide the appropriate line and column delimiters): https://kb.workfusion.com/display/RPAe/Clipboard#Clipboard-parsingParsingListsandTables


#10

hi,

I’ve succeeded to parse from multi-line string to Table variable, as you advised me. Great! Now, I don´t know the way to assing each cell’s values from the table to diferents strings

Thanks,


#11

why do you need a Table?

Maybe a List would be better?

Anyway, you can assign values using the For Each loop - https://kb.workfusion.com/display/RPAe/Loops#Loops-ForEach