Re: Extract all words between two keywords in .txt file (Python)

2019-12-12 Thread Ben Bacarisse
A S writes: > On Thursday, 12 December 2019 02:28:09 UTC+8, Ben Bacarisse wrote: >> A S writes: >> >> > I would like to extract all words within specific keywords in a .txt >> > file. For the keywords, there is a starting keyword of "PROC SQL;" (I >> > need this to be case insensitive) and the

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
On Thursday, 12 December 2019 04:55:46 UTC+8, Joel Goldstick wrote: > On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote: > > > > A S writes: > > > > > I would like to extract all words within specific keywords in a .txt > > > file. For the keywords, there is a starting keyword of "PROC SQL;" (

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
On Thursday, 12 December 2019 02:28:09 UTC+8, Ben Bacarisse wrote: > A S writes: > > > I would like to extract all words within specific keywords in a .txt > > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > > need this to be case insensitive) and the ending keyword could

Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
I would like to extract all words within specific keywords in a .txt file. For the keywords, there is a starting keyword of "PROC SQL;" (I need this to be case insensitive) and the ending keyword could be either "RUN;", "quit;" or "QUIT;". This is my sample .txt file. Thus far, this is my code:

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread Joel Goldstick
On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote: > > A S writes: > > > I would like to extract all words within specific keywords in a .txt > > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > > need this to be case insensitive) and the ending keyword could be > > eithe

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread Ben Bacarisse
A S writes: > I would like to extract all words within specific keywords in a .txt > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > need this to be case insensitive) and the ending keyword could be > either "RUN;", "quit;" or "QUIT;". This is my sample .txt file. > > Thus