How to TRIM a complex STRING_2020_7/27

dont know where is wrong…

My Var is"rps id": 348546", "

It’s fine to assign Var = Var.tostring

But when i write cell, It SHOWS ERROR:

Index was outside the bounds of the array

What happened?

1.And how to fix it?

2.IF I want to trim the Var to just leave the Numbers, What show i do??

Firstly, what is your Range Variable? as that looks like that could be the cause of your error.

If you want to just retrieve the numbers from the Var you can use an assign like below:
VarRPS = System.Text.RegularExpressions.Regex.Replace(VarRPS ,“\D”,“”)

1 Like

@111402
the screenshot shows ignored activities. Ensure that all relevant activities are enabled.
BTW: is is recommended to not have spaces within the variable name. Its not the rootcause of your issue, however do a renaming as well.

1 Like

thank you Timk it’s working!!!
YOU help me solve the problem bother me all night long, thank you sooo much.

1 Like

OK, I WILL chek them again.

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