Hi,
i have one issue…
Can you tell how to remove the special characters starting with the text.
Sample Words
(25
{[Zinc
#2542
${(Ports
Expected output
25
Zinc
2542
Ports
i am try to type the text or words i got error on special character so that i want to remove if starting with special character remove all the special character from the text.
Thanks
Shyam
Gokul001
(Gokul Balaji)
August 23, 2022, 7:57am
2
Hi @Shyam_Pragash
How about this expression
System.Text.RegularExpressions.Regex.Replace(YourString, “[^a-z A-Z 0-9]”,“”)
Regards
Gokul
Yoichi
(Yoichi)
August 23, 2022, 7:57am
3
Hi,
How about the following expression?
System.Text.RegularExpressions.Regex.Replace(yourString,"^[\W_]+","")
Regards,
1 Like
Gokul001
(Gokul Balaji)
August 23, 2022, 8:04am
6
Shyam_Pragash:
Can i try this code…
What are you trying @Shyam_Pragash
Have you tried about expression?
Regards
Gokul
1 Like
Hi @Gokul001
like this words i am going to type it.
(acrylc acid)
{([2,2′,2]′′)-Nitrilotri(ethan-1-ol)}
β-Aminoethanol
α-Sulfo-ω-(dodecyloxy)
(5R)-[(1S)-1,2-Dihydroxyethyl]
Thanks
Shyam
Gokul001
(Gokul Balaji)
August 23, 2022, 8:42am
8
Can you share the Output @Shyam_Pragash
Hi @Gokul001
Is it possible to type with special character is starting with text using Type into activity ?
or
any other activity ?
i want to type below text :
(acrylc acid)
{([2,2′,2]′′)-Nitrilotri(ethan-1-ol)}
β-Aminoethanol
α-Sulfo-ω-(dodecyloxy)
(5R)-[(1S)-1,2-Dihydroxyethyl]
Thanks
Shyam
Gokul001
(Gokul Balaji)
August 23, 2022, 9:03am
10
This is an new requirement @Shyam_Pragash
Hi @Gokul001
No…, its same process.
i tried to type above text using type into activity… i got error “Special Character Syntax Error”, So that i post is it way to remove special character in starting position.
Thanks
Shyam
Yoichi
(Yoichi)
August 23, 2022, 9:12am
12
Hi,
Can you try the following string as input?
(acrylc acid)
{([[2,2′,2]′′)-Nitrilotri(ethan-1-ol)}
β-Aminoethanol
α-Sulfo-ω-(dodecyloxy)
(5R)-[[(1S)-1,2-Dihydroxyethyl]
Regards,
Yoichi
(Yoichi)
August 23, 2022, 9:33am
14
Hi,
Can you share content of CurrentRow(“Synonyms”).ToString
Or
Try either of measures in the following post.
Hi,
[] is recognized as special characters in TypeInto Activity default mode and SendWindowsMessage mode.
There are some workaround as the following.
Use Simulate Type mode if possible. (It doesn’t work for some applications)
Escape [ like [[. You can use the following expression to escape it.
strData = System.Text.RegularExpressions.Regex.Replace(strData,"\[(.*?])","[[$1")
Use clipboard and Crrl+V as @Palaniyappan mentioned.
Regards,
Regards,
Yoichi
(Yoichi)
August 23, 2022, 9:42am
16
Hi,
Please check my previous post in detail. I doubled [
character , as the following.
(acrylc acid)
{([[2,2′,2]′′)-Nitrilotri(ethan-1-ol)}
β-Aminoethanol
α-Sulfo-ω-(dodecyloxy)
(5R)-[[(1S)-1,2-Dihydroxyethyl]
Or can you try the following expression?
System.Text.RegularExpressions.Regex.Replace(CurrentRow("Synonyms").ToString,"\[(.*?])","[[$1")
Regards,
1 Like
Hi @Yoichi @Gokul001
Thanks You
Code is working : System.Text.RegularExpressions.Regex.Replace(CurrentRow(“Synonyms-SD”).ToString,“[(.*?])”,“[[$1”)
Thanks
Shyam
1 Like
system
(system)
Closed
August 26, 2022, 9:56am
18
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.