python search replace using wildcards
- by tom smith
hi
somewhat confused.. but trying to do a search/repace using wildcards
if i have something like:
<blah.... ssf ff>
<bl.... ssf dfggg ff>
<b.... ssf ghhjj fhf>
and i want to replace all of the above strings with say,
<hh >t
any thoughts/comments on how this can be accomplished?
thanks
update (thanks for the comments!)
i'm missing something...
my initial sample text are:
Soo Choi</span>LONGEDITBOX">Apryl Berney
Soo Choi</span>LONGEDITBOX">Joel Franks
Joel Franks</span>GEDITBOX">Alexander Yamato
and i'm trying to get
Soo Choi foo Apryl Berney
Soo Choi foo Joel Franks
Joel Franks foo Alexander Yamato
i've tried derivations of
name=re.sub("</s[^>]*\">"," foo ",name)
but i'm missing something...
thoughts... thanks