Initial commit
This commit is contained in:
10
services/recognizer.py
Normal file
10
services/recognizer.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def recognize_pinpad_code(text: str) -> Optional[int]:
|
||||
if not text:
|
||||
return None
|
||||
|
||||
match = re.search(r"\b\d{3}\b", text)
|
||||
return int(match.group()) if match else None
|
||||
Reference in New Issue
Block a user