Skip to content

Searches multiple MS doc files for a regex expression

Notifications You must be signed in to change notification settings

wpatton97/DocSearcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

DocSearcher

A program to search multiple a directory nested with nested doc files, and return any matching text to the result string

Usage

./DocSearcher FILEPATH "FILENAME REGEX" "SEARCH REGEX" [NUM LINES AROUND MATCH]

  • FILENAME REGEX - Refers to the regex that will tell the program which doc files to search
  • SEARCH REGEX - Refers to the regex that will be searched through each file
  • NUM LINES AROUND MATCH[OPTIONAL] - Will print N extra lines before and after each match

Requirements

'antiword' must be installed to your local machine

Installing

brew install antiword # if you are on mac/missing antiword
sudo apt install antiword # if you are on debian/missing antiword
sudo pacman -Syu antiword # if you are on arch missing antiword

go get github.com/Ragex04/DocSearcher
go install github.com/Ragex04/DocSearcher

./DocSearcher Past_Exams/Solutions "(Sol|sol)\w*(.doc)" "(IP address)"

Most this code depends on Antiword, credit to antiword goes to Adri van Os(http://www.winfield.demon.nl/)

About

Searches multiple MS doc files for a regex expression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages