I have a string in the form
Code: Select all
result="(2)(3)(4)(14)(15)(16)(30)(62)<57>(64)(65)<71><72><66>(67)(68)(70)<69>(57I1O2)<58><60><63>(71)(72)(66)(69)<48>(58)<59>(60)<61>(63)(48)(59)(61)"
Code: Select all
cont_tag="<"+to_string(obj_id)+">"
if instr(result,cont_tag)>0 then result=left(result,instr(result,cont_tag))+mid(result,instr(result,cont_tag)+len(cont_tag)+1)
cont_tag="("+to_string(obj_id)+")"
if instr(result,cont_tag)>0 then result=left(result,instr(result,cont_tag)-1)+mid(result,instr(result,cont_tag)+len(cont_tag))
print result
The two result= parts after the ifs look for (number) and <number> in result and strip them out. Eg if number is 58 the result will be
Code: Select all
(2)(3)(4)(14)(15)(16)(30)(62)<57>(64)(65)<71><72><66>(67)(68)(70)<69>(57I1O2)<60><63>(71)(72)(66)(69)<48><59>(60)<61>(63)(48)(59)(61)
Anyone know?