import re
text = "aaa v_abc v_def"
dictionary = { 'abc':'yes' }
print( re.sub(r'v_([a-z_]+)', lambda x: dictionary.get(x.group(1),x.group()), text) )
# => aaa yes v_def