I have a problem with preg_split
. I need a regex to split my string into number and character. An example of my string is:
1_AB_CD_2_ABC_3_ABD
and I want a result splitted:
1
AB_CD
2
ABC
3
ABD
I've tried with this regex expression but this one not work:
preg_split("/(^\d)(?=_)|(?<=_)(\d)(?=_)/",$sequence,PREG_SPLIT_DELIM_CAPTURE).