# http://stackoverflow.com/q/32861718/5290909
import re

text = '''
<modules>
    <Orba_Sheepla>
        <!-- module version -->
        <version>0.9.25</version>
    </Orba_Sheepla>
</modules>'''

pattern = re.compile( r'^([ \t]+)<version>.*?^(?!\1)[ \t]*</([^\s>]+)', re.I | re.S | re.M)
match = pattern.search(text)

if match:
    print(match.group(2))