file/re search and sub problem
tiddlerdeja at my-deja.com
tiddlerdeja at my-deja.com
Wed Jun 28 15:54:14 EDT 2000
More information about the Python-list mailing list
Wed Jun 28 15:54:14 EDT 2000
- Previous message (by thread): file/re search and sub problem
- Next message (by thread): native Python text editor with Hebrew support?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Any help appreciated...
I have a re:
wilf_re = re.compile('[^A-Z]ebitda[^A-Z]', re.IGNORECASE)
And I do a search and replace
if wilf_re.search(file):
# perform the substitution
new_file = wilf_re.sub(" EBITDA", file)
This isn't really what I want. If I have
ebitda</td>
It replaces it with
EBITDA/td>
Can someone tell me how I go about getting:
EBITDA</td>
Any help geatly appreciated.
Sent via Deja.com http://www.deja.com/
Before you buy.
- Previous message (by thread): file/re search and sub problem
- Next message (by thread): native Python text editor with Hebrew support?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list