> i find this code translate enter once to "<p>" , and enter twice is > still "<p>". > i want keep "<BR>", ie. enter once i get a "<BR>", enter twice i get a > "<p>" > is this possible?
Ah...I misunderstood what you wanted. Yes, the same sort of thing could work: r = re.compile('([^\n])\n([^\n])') text = r.sub(r'\1 \n\2', text) -tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---