A slightly more generic approach will be to to capture groups. For example, we can capture variable type, name and value as groups using the pattern-matcher as follows:
s = 'int myCodeVersion = 100;'
import re
# compile the regex pattern, if you need to use multiple times, it will be faster
pattern = re.compile(r"(int|float|double)\s+([A-Za-z][A-Za-z0-9_]+)\s*=\s*(\d+)\s*;")
m = re.match(pattern, s)
print 'var type: ' + m.group(1)
print 'var name: ' + m.group(2)
print 'var value: ' + m.group(3)
#var type: int
#var name: myCodeVersion
#var value: 100
For the specific case you are interested in the code can be simplified to the following using the same approach:
pattern = re.compile(r"int\s+myCodeVersion\s*=\s*(\d+)\s*;")
print 'My Code version: ' + ''.join(map(str, re.match(pattern, s).group(1)))
# My Code version: 100