cordada / lib-cl-sii-python

Python library for Servicio de Impuestos Internos (SII) of Chile
https://lib-cl-sii-python.readthedocs.io
MIT License
27 stars 11 forks source link

rut.crypto_utils: RUT cleaning regex breaks RUTs with non-numeric check digit #700

Closed jtrobles-cdd closed 1 month ago

jtrobles-cdd commented 1 month ago

The following regular expression causes the removal of all letters from a string, including the letter K.

https://github.com/cordada/lib-cl-sii-python/blob/c8d922b3e076953e35bec044d560807bd171dbb6/src/cl_sii/rut/crypto_utils.py#L54

Ref: https://app.shortcut.com/cordada/story/9821