diff --git a/src/documents/barcodes.py b/src/documents/barcodes.py index 3e2b309b6..005531107 100644 --- a/src/documents/barcodes.py +++ b/src/documents/barcodes.py @@ -105,7 +105,7 @@ class BarcodeReader: asn_text = asn_text[len(settings.CONSUMER_ASN_BARCODE_PREFIX) :].strip() # remove non-numeric parts of the remaining string - asn_text = re.sub("[^0-9]", "", asn_text) + asn_text = re.sub(r"\D", "", asn_text) # now, try parsing the ASN number try: