String search

pranav pranny at gmail.com
Fri Feb 27 04:33:44 EST 2009


Greeting fellow pycoders,

I have a script that browses large codes and replaces certain text
with some other text. Of lately i observed an issue.Some of the
original text were like

<cfif IsDefined("attributes.SOFTPREREQ")>
    ,N'#attributes.SOFTPREREQ#'
</cfif>

My module does scan this code and suggests replacement to this code.
But when i use the string.replace() method, it just fails. A
string.find() for above code in the whole file returns code -1.
Where am i going wrong? I figure it could be something to do with
character encoding or else.

Please someone guide me soon. I have a deadline to attend :-(

Thanks in advance,

Pranav





More information about the Python-list mailing list