Re: trouble with replace

2006-08-12 Thread f pemberton
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, f pemberton > wrote: > > > I've tried using replace but its not working for me. > > xdata.replace('abcdef', 'highway') > > xdata.replace('defgef', 'news&#x

trouble with replace

2006-08-12 Thread f pemberton
I have a string (xdata) and theres a newline after every 17 characters of the string. I was wondering how I can replace multiple substrings multiple times within a string? To put it another way, this is what i want to do. Substring to find ("abcdef") replace it with ("highway") search again, subst

easy string formating question

2006-08-10 Thread f pemberton
I have kind of an interesting string, it looks like a couple hundred letters bunched together with no spaces. Anyway, i'm trying to put a "?" and a (\n) newline after every 100th character of the string and then write that string to a file. How would I go about doing that? Any help would be much