Comments (4)
date_format
Matches dates like 19.08.15 and 19. 08. 2015: it's used to parse each date in a receipt
sum_format
is analogous
from receipt-parser-legacy.
I meant to say how this line is working, if i want to add for 19-Aug-2015 or 08/19/2015, how i should change following line of code. Hope now its clear
date_format: '.*?(?P(\d{2,4}(.\s?|[^a-zA-Z\d])\d{2}(.\s?|[^a-zA-Z\d])(20)?1[3-6]))\s+'
from receipt-parser-legacy.
Working with regular expression is always a very... delicate endeavor.
Usually I use interactive tools like the awesome regex101 to come up with somewhat working expressions.
So here's a start, which matches your formats (including the existing ones):
(\d+)(.|-|\/)\s?([A-Za-z0-9]+)(.|-|\/)\s?(20)?(\d+)
Demo: https://regex101.com/r/HKXAbS/1
You might still need the .*?
and the \s+
at the beginning and the end to make it work.
from receipt-parser-legacy.
you are winner man...thanks @mre
from receipt-parser-legacy.
Related Issues (20)
- Docker image not working in Ubuntu 22.04 HOT 4
- How to Run This code HOT 1
- No image found HOT 1
- Unclear documentation HOT 9
- convert: no decode delegate for this image format `JPEG' @ error/constitute.c/ReadImage/508. HOT 3
- Consider moving to Jazzband (a team of Python maintainers) HOT 1
- Fix failing unit test for market name HOT 3
- Support for PDF receipts HOT 1
- Switch to ImageMagick auto-orient instead of a hard coded 90 degree rotation HOT 4
- make docker-run HOT 2
- make run HOT 1
- make docker-run not working HOT 9
- Parsing date fails with unsanitized input HOT 3
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- [APPLICATION] Receipt parser front end HOT 3
- OCR support for single articles HOT 21
- Update README.md with Windows Commands HOT 2
- Vertical receipt OCR outputs garbage HOT 4
- add API endpoints HOT 1
- UnicodeEncodeError while reading image data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from receipt-parser-legacy.