fix: NIP regex handles any separator format (588-20-15-465)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Previous regex only matched 3-3-2-2 format. New universal pattern catches any 10-digit NIP with dashes/spaces in any position. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
409557ceab
commit
ec8d419fad
@ -89,7 +89,7 @@ def _validate_regon(regon):
|
||||
|
||||
def _find_nips_in_text(text):
|
||||
patterns = [
|
||||
r'NIP[:\s]*(\d{3}[-\s]?\d{3}[-\s]?\d{2}[-\s]?\d{2})',
|
||||
r'NIP[:\s]*([\d][\d\s-]{8,13}[\d])', # any 10-digit with separators
|
||||
r'NIP[:\s]*(\d{10})',
|
||||
r'numer\s+identyfikacji\s+podatkowej[:\s]*(\d{10})',
|
||||
]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user