get the matched regular expression position in string.

contro opinion contropinion at gmail.com
Mon Sep 3 04:18:45 EDT 2012


Here is a string :

str1="ha,hihi,aaaaa,ok"

I want to get the position of "," in the str1,Which can count 3,8,14.


how can I get it in python ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120903/ae5346f7/attachment.html>


More information about the Python-list mailing list