On Wed, 25 Mar 2015 14:19:39 -0700, Gregg Dotoli wrote: > On Wednesday, March 25, 2015 at 4:36:01 PM UTC-4, Denis McMahon wrote: >> On Tue, 24 Mar 2015 11:13:41 -0700, gdotoli wrote: >> >> > I am creating a tool to search a filesystem for one simple string. >> >> man grep >> >> STOP! REINVENTING! THE! WHEEL! >> >> Your new wheel will invariably be slower and less efficient than the >> old one.
> Grep is regular expressions. If I'm using Python, I'll use the Python > modules. > Silly 1. Please don't top post, this is usenet, we don't top post, comments go after the text they comment on soi we can read down the page and it makes sense. 2. You gave the thread the title of "regex python help". 3. Your initial comment was "I am creating a tool to search a filesystem for one simple string." 4. The tool (see 3) already exists, it's called grep, it uses regular expressions (see 2). It's also going to be a lot faster than using python. 5. According to your post, grep seems to be the tool you are looking for. 6. Reinventing grep in python seems much more silly to me, by the time you've finished writing and testing the python code (especially if you need to seek help from a newsgroup in the process) grep would have found and identified every file containing your "one simple string". -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list