How To Replace Special Character in String by an Empty Filed

Dears,

How To Replace Special Character [1]* found in String by an Empty Filed

Example :
I have one string ( sentence) which contains Quotation mark ".
String : The " ! " symbol is called : " an exclamation mark"

I want to assing a string to that sentence and replace all " by an empty field

Output : The ! Symbol is called : an exclamation mark.

Thanks in Advance


  1. !@#%^&*(),.?“”:{}|<> ↩︎

Hi

Hope you are doing well

Hi his expression in a assign activity would help you resolve this

Str_output = System.Text.RegularExpressions.Regex.Replace(strIn, “[^\w\-]”, “”).ToString

Cheers @hsendel

2 Likes

Hi,

outputString=System.Text.RegularExpressions.Regex.Replace(variable, “[^a-z A-Z 0-9]”, “”)

1 Like

Hello @Palaniyappan , I’m fine Thanks , hope same for you too.
But initialy how to define this sentence, I got an error when assign it to a string

image

Knowing that this sentence will be extracted from a text

1 Like

“The”+“!”+“symbol is called:”+“an exclamation mark”

“The”+“!”+“symbol is called:”+“!”

1 Like

Hey! @hsendel

try Matches(RegEx).

Thanks & Regards
NaNi

1 Like

Fine mention it like this

Put two double quotes instead of single quotes wherever you feel like adding a double quotes
Like this

Cheers @hsendel

1 Like

Got it @Palaniyappan , So each time we encounter a quotation mark we double the quotes :+1:… Thanks for support you and @ghazanfar , @THIRU_NANI

1 Like

Yeah exactly
@hsendel

1 Like

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