How to clean string after OCR?

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

Hello @Mac,

I think your problem is similar to this:

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

Regards,
Susana

Thanks Susana :slight_smile: ,

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

Mac

1 Like