Excel hidden formatting symbol

Hi,

In XLS there is input like “EPVD 1128/2022”:

image

which in Word shows hidden formating symbols like this:

image

I need to replace the two hidden formatting symbols

image

but do not now what character they are.

Any suggestions?

Thx and kind regards,
Vanja

@VanjaV

You can use regular expressions before pasting the data

System.Text.RegularExpressions.Regex.Replace(str,"[^A-Za-z0-9/]*"," ")

Cheers

Hi @Anil_G

it does:

image

If I use System.Text.RegularExpressions.Regex.Replace(vcString,“[^A-Za-z0-9/]*”,“”), then it does:

image

But I need to keep the space:

image

Kind regards, Vanja

@VanjaV

Please try using plus(+) instead of star(*)

And retain space only

Cheers

1 Like

Hi @Anil_G this is great!

But now it cuts “(” and “)” from the whole content:

image

@VanjaV

If you need brackets then the expression would be like this

"[^A-Za-z0-9/()]+"

Basically what I am doing here is giving the expression to not consider the values I specified and replace any other value with space

Cheers

1 Like

Hi @VanjaV ,

use the curved brackets in your condition:

[^A-Za-z0-9()]+

Regards,

2 Likes

Yes, this is it:

image

Thank you very much!
Vanja

1 Like

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