Thanks in advance to whoever can help me!
I guess this might be an easy question but I'm horrible with regular expressions. I need to split all of the authors inside an XML tag by a number that follows the authors name but I ALSO NEED TO INCLUDE THE NUMBER in the match that is outputted. So something like this:
<authors>joe smith1 jane doe2 jack johnson3</authors>
=> joe smith1
=> jane doe2
=> jack johnson3
I need to do the same with affiliations but the number is in the front this time:
<affiliations>1 university of nowhere 2 ministry of silly walks 3 pcu</affiliations>
=> 1 university of nowhere
=> 2 ministry of silly walks
=> 3 pcu
How can I do this using preg_match, preg_split or some other reg ex matching solution?