Thursday, June 28, 2012

Re: replace or regex

first is s='<ul>
   <li>A
     <ul>
         <li>B</li>
     </ul>
  </li>
</ul>'
s.replace('<ul>' ,' ', 1 ) 

but i dont remove last </ul> tag.

2012/6/28 pakyazilim <pakyazilim@gmail.com>
i have text ;
<ul>
   <li>A
     <ul>
         <li>B</li>
     </ul>
  </li>
</ul>

i want to remove first <ul> end for text end </ul> tag. 
how can i it?
thanks you...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/lPA-eOEgEBYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment