Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: .txt return specific lines or strings
Post: RE: .txt return specific lines or strings

I got it. Thanks import re # Target file to search target_file = 'randomtextfile.txt' # Open the target file in Read mode target_open = open(target_file, 'r') # Read the file read_file = target_ope...
s_o_what Web Scraping & Web Development 8 4,489 Feb-08-2019, 02:34 AM
    Thread: .txt return specific lines or strings
Post: RE: .txt return specific lines or strings

This is what I have so far... I think my order might be messed up because it is printing the line following a line that contains a '.' # Target file to search target_file = 'randomtextfile.txt' # Op...
s_o_what Web Scraping & Web Development 8 4,489 Feb-07-2019, 04:50 PM
    Thread: .txt return specific lines or strings
Post: RE: .txt return specific lines or strings

I know about the for loop but was hoping for a step in the right direction.
s_o_what Web Scraping & Web Development 8 4,489 Feb-06-2019, 03:19 AM
    Thread: .txt return specific lines or strings
Post: .txt return specific lines or strings

I have a text file I would like to read and search. I need to find specific strings that could possibly be URLs. Once that is found I would like to store them in a list or set. # Target file to searc...
s_o_what Web Scraping & Web Development 8 4,489 Feb-06-2019, 02:53 AM

User Panel Messages

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