If the first five characters are also followed by an underscore, you should just use str.split
:
w = x.split('_')
print([w[0],w[6]])
Output (for your sample data):
['1P2VI', 'P018']
['V92EM', '10']
If not, you can use this regex, which captures the first 5 characters, then skips the next 6 groups of characters ending in an underscore, and then captures the characters up to the next underscore:
^(.{5})(?:[^_]*_){6}([^_]*)
In python:
w = re.search(r'^(.{5})(?:[^_]*_){6}([^_]*)', x)
print([w[1],w[2]])
Output:
['1P2VI', 'P018']
['V92EM', '10']
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…