Monks,
Here i need some help in split.
Input:
<AU>PAUL A. HUBBARD,<SUP>1</SUP> WENFENG YU,<SUP>2</SUP> HORST SCHULZ,<SUP>2</SUP> JUNG-JA P. KIM<SUP>1</SUP></AU>
output:
<contribgroup> <contributor>PAUL A. HUBBARD<SUP>1</SUP></contributor> <contributor>WENFENG YU<SUP>2</SUP></contributor> <contributor>HORST SCHULZ<SUP>2</SUP></contributor> <contributor>JUNG-JA P. KIM<SUP>1</SUP></contributor> </contribgroup>
In the input the <SUP>(.*?)</SUP> is optional.
So i tried using split , and retaining <SUP> . my @au = map '<contributor">'.$_.'</contributor>', split /(,|(?=<\/SUP>)) /, $au;or is there anyother easy way to do it.
In reply to split with '|' by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |