<div dir="ltr">I'm sitting here feeling very stupid, can anybody explain to me in terms that<div>a child of five could understand what's going on here:</div><div><br></div><div>Problem: I want to split a string on repeated  occurrences of the string</div>
<div>"abc"</div><div><br></div><div>  so split("123abcabc456") should return [<<"123">>,<<"456">>]</div><div><br></div><div>So I thought I could use re for this:</div>
<div><br></div><div>> re:split("123abcabc456", "(abc)+").         </div><div>[<<"123">>,<<"abc">>,<<"456">>]</div><div><br></div><div>
<br></div><div>The manual page says the matching split string is not included in the</div><div>output - at least that what it appear to me to say.</div><div><br></div><div>How in the name of the great blue-eyed slimy thing that hides under stones</div>
<div>can I get rid of the additional <<"abc">> - this is totally not obvious to me.</div><div><br></div><div>try again:</div><div><br></div><div>> re:split("123abcabcabc456", "abc",[notempty]).</div>
<div>[<<"123">>,<<>>,<<>>,<<"456">>]</div><div><br></div><div><br></div><div>I was under the vague impression that <<>> *was* and empty string</div>
<div><br></div><div>I knew I hated regular expressions, can't they be outlawed?<br></div><div><br></div><div><br></div><div><br></div><div>/Joe</div></div>