> I am scanning a text file and replacing words with alternatives. My 
> difficulty 
> is that all occurrences are replaced (even if they are part of another 
> word!)..

Could you search for the string ' word ' with the white spaces around it?  
Shouldn't
that only replace words that are not part of another word?

> Essentially, I would like to replace only the occurrence that is currently 
> selected-- not the rest. for example:


What do you mean by a word being "currently selected"?  That phrase and
"scanning a text file" don't make sense to me together.  How is the user 
reading the text to select the word that is to be replaced?  (Or maybe I am
not understanding something?)

CM

_________________________________________________________________
Bing™ brings you maps, menus, and reviews organized in one place. Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TXT_MLOGEN_Local_Local_Restaurants_1x1
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to