Python Forum
Can python be used to search a word document for combinations of 6 digits?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can python be used to search a word document for combinations of 6 digits?
#1
Good morning, sorry I am new to python, but I think it could help me with a problem. I have a word/notepad document that I need to search for 6 digit combinations that already exist in the document. Does anyone know if you can use python for this and if so does anyone have an example script I could use/copy/modify?

thank you,

gk
Reply
#2
It can certainly be done. The best way to do it would be to save it as a plain text document, read the document in and use the re module's findall to do a regular expression search for the regex '\d\d\d\d\d\d'.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
thank you!

gk
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to summarize an article that is stored in a word document on your laptop? Mikedicenso87 2 613 Oct-06-2023, 12:07 PM
Last Post: Mikedicenso87
  Search for multiple unknown 3 (2) Byte combinations in a file. lastyle 7 1,257 Aug-14-2023, 02:28 AM
Last Post: deanhystad
  Finding combinations of list of items (30 or so) LynnS 1 837 Jan-25-2023, 02:57 PM
Last Post: deanhystad
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 2,455 Aug-12-2021, 04:25 PM
Last Post: palladium
  How can I find all combinations with a regular expression? AlekseyPython 0 1,637 Jun-23-2021, 04:48 PM
Last Post: AlekseyPython
  How to read check boxes from word document srikanthpython 0 2,551 Mar-30-2021, 01:58 PM
Last Post: srikanthpython
  All possible combinations CODEP 2 1,826 Dec-01-2020, 06:10 PM
Last Post: deanhystad
  Single digits seem to be greater than double digits Frosty_GM 4 3,436 Nov-20-2020, 10:13 AM
Last Post: DeaD_EyE
  search for more than one word using lambda illmattic 2 1,985 Nov-13-2020, 11:44 AM
Last Post: illmattic
  Triplet Combinations of All Values quest 2 1,938 Nov-05-2020, 09:22 AM
Last Post: quest

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020