Thanks Fredrik,
I was not aware of finditer. Iterators are very usefull !
--
http://mail.python.org/mailman/listinfo/python-list
Tool69 wrote:
> supposed I've got the following text :
>
> mytext = "for in :"
>
> with the following simple pattern : pattern = "<[a-z]+>"
>
> I use re.findall(pattern, mytext) wich returns :
> ['','']
>
> Now, I want my prog to return the positions of the returned list
> elements, ie :
> w
Hi,
supposed I've got the following text :
mytext = "for in :"
with the following simple pattern : pattern = "<[a-z]+>"
I use re.findall(pattern, mytext) wich returns :
['','']
Now, I want my prog to return the positions of the returned list
elements, ie :
was found at position 5 in mytext
w