Selector issue with '

I am working with the selector with excel information. However, the name contains ', so the selector failed. Please kindly advise…

Selector: The name is “XXX’L Limited”

When I used it as the selector:
image

It fails because of the 'L cannot be identified. Please advise how to change the ’ to selector. Thanks.

1 Like

If have had similar issue.
So here is what i did.

before you are are using the dynamic selector value row(0).toString you can use a replace of ’ with * and then use that variable in the selector.

You can do that directly here as well.

row(0).ToString.Replace("'","*")

1 Like

HI @Nadim,

Now is row(0).ToString.Replace(" ’ ", “*”). How to cater multiple special characters (i.e. , ( ) - ’ ")? in the string? Thanks.

1 Like

well you can use Regex for multiple char replace in one line.

System.Text.RegularExpressions.Regex.Replace(row(0).ToString, "['|,|(|-|"|)]", "*")