Compare commits

...

2 Commits

Author SHA1 Message Date
Josh Hawkins
a14fe18c01 wording 2025-12-12 07:34:37 -06:00
Josh Hawkins
c1dff23e12 don't use python style raw prefixes in yaml examples in LPR docs 2025-12-12 07:28:44 -06:00

View File

@ -114,16 +114,16 @@ These rules must be defined at the global level of your `lpr` config.
```yaml
lpr:
replace_rules:
- pattern: r'[%#*?]' # Remove noise symbols
- pattern: "[%#*?]" # Remove noise symbols
replacement: ""
- pattern: r'[= ]' # Normalize = or space to dash
- pattern: "[= ]" # Normalize = or space to dash
replacement: "-"
- pattern: "O" # Swap 'O' to '0' (common OCR error)
replacement: "0"
- pattern: r'I' # Swap 'I' to '1'
- pattern: "I" # Swap 'I' to '1'
replacement: "1"
- pattern: r'(\w{3})(\w{3})' # Split 6 chars into groups (e.g., ABC123 → ABC-123)
replacement: r'\1-\2'
- pattern: '(\w{3})(\w{3})' # Split 6 chars into groups (e.g., ABC123 → ABC-123) - use single quotes to preserve backslashes
replacement: '\1-\2'
```
- Rules fire in order: In the example above: clean noise first, then separators, then swaps, then splits.