Replace and inserting strings within .txt files with the use of regex

Νίκος nikos.the.gr33k at
Mon Aug 9 19:40:35 CEST 2010

On 9 Αύγ, 19:21, Peter Otten <__pete... at> wrote:
> Νίκος wrote:
> > Please tell me that no matter what weird charhs has inside ic an still
> > open thosie fiels and make the neccessary replacements.
> Go back to 2.6 for the moment and defer learning about unicode until you're
> done with the conversion job.

You are correct again! 3.2 caused the problem, i switched to 2.7 and
now i donyt have that problem anymore. File is openign okey!

it ALMOST convert correctly!

# replace tags
print ( 'replacing php tags and contents within' )
src_data = re.sub( '<\?(.*?)\?>', '', src_data )

it only convert the first instance of php tages and not the rest?
But why?

More information about the Python-list mailing list