I am trying to find regx for following string
<Method name="aa" numberOfInstances="1" /><Method name="bb" numberOfInstances="4" />
I want Method name and numberOfInstances
Output would be
aa 1
bb 4
I achieved it by substring, but it's slow
fun_indexs= [i for i in range(len(line)) if line.startswith('Method name=',i)]
count_indexs= [i for i in range(len(line)) if line.startswith('numberOfInstances=',i)]
slash_index= [i for i in range(len(line) ) if line.startswith('/>', i )]
Any help appreciated.