Correction...

re.subn(r'.{1,502}' ,'replacewiththis', srcString)


Timothy Farrell wrote:
> Regular Expressions would probably be more robust...but doing such a 
> large replace seems odd to me.  If it were my code I would look for a 
> way around not having so much that needed replacing.  Or perhaps you 
> should use string slicing.  Anyway, here's how you would do it with regexps:
>
> import re
> re.subn(r'.{1-502}' ,'replacewiththis', srcString)
>
> Phyo Arkar wrote:
>   
>> Dear All;
>>
>> If anyone knows ?I would like to know if there Size Limitation on 
>> str.replace() function.
>>
>> Because from what i have tested , it no-longer replace anything after 
>> 502  length of string.
>>
>> I want to replace a huge block of string and that ,  i am having problem.
>>
>> Regards,
>>
>> Phyo.
>>
>>
>>
>>
>>
>>     
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn:Timothy Farrell
n:Farrell;Timothy
org:Statewide General Insurance Agency;IT
adr:;;4501 East 31st Street;Tulsa;OK;74135;US
email;internet:[EMAIL PROTECTED]
title:Computer Guy
tel;work:(918)492-1446
url:www.swgen.com
version:2.1
end:vcard

Reply via email to