[] is this character inside " " accepted as string?

Hi All

I have a column name “Source [list]” in a csv file. So I want to find that column by doing Ctrl+f and typing the same and replace with “Source [list]_1”. But the ‘[’ and ‘]’ are not getting typed in the Find and Replace window. Only Source is being typed.

What is the issue ?

Fine
Did we try with set to clipboard activity instead of type into activity
That is pass the same value as string to set to clipboard and then use Send hot key activity with key as ctrl+v which will paste the value from clipboard
Which can be used instead of Type into activity
And while using send hot key activity use just key alone and no element chosen for selector

Cheers @kkpatel

Hi,

[] is recognized as special characters in TypeInto Activity default mode and SendWindowsMessage mode.
There are some workaround as the following.

  1. Use Simulate Type mode if possible. (It doesn’t work for some applications)

  2. Escape [ like [[. You can use the following expression to escape it.
    strData = System.Text.RegularExpressions.Regex.Replace(strData,"\[(.*?])","[[$1")

  3. Use clipboard and Crrl+V as @Palaniyappan mentioned.

Regards,

I want to understand why only keys not selector.

If no selector is chosen where will it type the text ?

Hi @kkpatel

try to indicate the textbox of Ctrl+f and then use ctrl+v vased on @Palaniyappan instructions

Thanks
Ashwin S

@Yoichi Can you explain the 2 option how it is working.
Like Why it is not replacing whole "[] " as per pattern it should detect and replace what ever in square bracket

Hi,

We can also write regex pattern which matches whole square blackets as the following, for example.

System.Text.RegularExpressions.Regex.Replace(strData,"\[.*?]","[$0")

The above pattern is emphasized escaping [ character, like [ is replaced to [[.

Regards,