Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mnumbp

macrumors newbie
Original poster
Feb 5, 2010
2
0
Trying to create program with Python and Tesseract. Goal to extract a multiple digit number from files. Any ideas?
 
Need to define a variable numeric with 7 digits from 0000000 to 9999999. Goal is for the optical character recognition program to only pull the 7 digit number. I'm able to only pull all characters at this point.
 
Look into using regular expressions for matches
Code:
\D?\d{7}\D?
  • \d matches any digit
  • \D matches any non-digit
  • ? means may or may not be present
  • {7} means for 7 characters.
 
you will never get any idea about programming by python and i don;t think so that you will actually learn the thing by these way as the subject you are discussing is very large and complicated. So i just want to say you that you must search the Internet for these and you will definitely got the more valuable knowledge from these,actually brother we all are using the forums to discuss the problem related to our technology not to learn the technology.Hope you can understand.Sorry if you don't like my opinion.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.