I have created some strings as below:
let firstname = ""
let lastname = ""
let myInfo = "Dana<fname>Dana<lname>CEO<occupation>0123456<hp>01234567<wp>[email protected]<email>"
I want to extract certain parts out of that string. For example, I want to assign the part before <fname> to the firstname variable, and the part before <lname> to the lastname variable.