Help with get text and place it into a new variable

Hi,

Have a case where I’m trying to extract the 78 from the text “Amount of rows 78 / 204’”
Then place it into a variable, convert that into a int32, that lets the program know how many times it should repeat the task.

I have a crude way of doing it but if the tast has to be done more than 1000 times its gonna fail.

Hi,

Can you try the following sample?

System.Text.RegularExpressions.Regex.Match(amount,"\d+").Value

Sample20230222-3aL.zip (3.8 KB)

Regards,

No couldnt get that to work.

Hi,

The following expression returns 78, as the following image.

System.Text.RegularExpressions.Regex.Match("Amount of rows 78 / 204","\d+").Value

Is your text exactly"Amount of rows 78 / 204"?

Regards,

I solve this by using get attribute and Split, then convert that result into a INT32.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.