Defining multiple digit variables using Python

Discussion in 'Mac Programming' started by mnumbp, Feb 5, 2010.

  1. mnumbp macrumors newbie

    Feb 5, 2010
    Trying to create program with Python and Tesseract. Goal to extract a multiple digit number from files. Any ideas?
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
  3. mnumbp thread starter macrumors newbie

    Feb 5, 2010
    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.
  4. angelwatt Moderator emeritus


    Aug 16, 2005
    Look into using regular expressions for matches
    • \d matches any digit
    • \D matches any non-digit
    • ? means may or may not be present
    • {7} means for 7 characters.
  5. steavelee2 macrumors newbie

    Feb 3, 2010
    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.

Share This Page