re.search question

michaelian ennis mennis at corvus.net
Wed Jul 31 17:54:20 EDT 2002


How would I tell python to give me all the text in a string which
falls between  the first instance of "!" alone on a line and the first
instance of "end" alone on a line inclusively?


lines=
junk 
!
important stuff
end
more junk


to 

cleaned_lines=
!
important stuff
end





More information about the Python-list mailing list