given a string:

st="abcdatraataza"
    ^   ^     ^ ^ (these should be found)
I want to get the positions of all single 'a' characters.
(Without another 'a' neighbour)

So I tried: 
r=re.compile('[^a]a([^a]') 

but this applies only for 
the a's, which has neighbours.
So I need also '^a' and 'a$'.

Am I doing something wrong? 
Is there a easier solution?
How can I quickly get all these positions?

Thank you in advance.
-- 
Franz Steinhaeusler
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to