How to clean string after OCR?


#1

Hello,

I have 11 signs, numerical string.
After doing OCR, I’ve got 12 signs.

I tried:
String.Replace(" “,”")
String.Replace("[^0-9]","")

but without succeed…

any suggestions?

Mac


#2

Hello @Mac,

I think your problem is similar to this:

Try to use Regex.Replace(yourString, “\d”, “”)

Regards,
Susana


#3

Thanks Susana :slight_smile: ,

Solution:
System.Text.RegularExpressions.Regex.Replace(yourString, “[^\d]”, “”)

Mac