H
HMS Surprise
Greetings.
Given the string s below and using only python built-in capabilities,
I am trying to isolate the substring G132153. This string may have any
number of digits but the pieces around it will not change. I have
accomplished this with split but there must be a more elegant and
compact way to do this.
Thanks,
jvh
Given the string s below and using only python built-in capabilities,
I am trying to isolate the substring G132153. This string may have any
number of digits but the pieces around it will not change. I have
accomplished this with split but there must be a more elegant and
compact way to do this.
'G132153's ='<a href="../active/Group_Detail.php?GroupID=G132153&SvcType=1&AType=V" class="dvLink">G132153</a>'
t = s.split('">')
u = t[-1].split('<')
v = u[0]
v
Thanks,
jvh