regexp/python

  • From: "Alex Hall" <mehgcap@xxxxxxxxx>
  • To: "Blind Programming List" <programmingblind@xxxxxxxxxxxxx>
  • Date: Sun, 14 Feb 2010 15:33:52 -0500

Hi all,
I am trying to write a regexp in python to look at a file (as a big string) 
and erase all text before a certain word, then erase all text after a second 
keyword. This sentence:
All this should be deleted <save>except for this</save>, so delete it!
would be turned into
except for this

I am not sure how to go about this, though. If I were using a batch-like 
syntax, my string to match might be
*<save>
and then
</save>*

but the star character is used to repeat a regexp op, not as a wildcard in 
the text itself. Am I just misunderstanding something here? Thanks.


Have a great day,
Alex (msg sent from PC)
Email: mehgcap@xxxxxxxxx 

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: