in reply to •Re: Regex - unordered lookaround syntax
in thread Regex - unordered lookaround syntax
I had always understood when I needed split, and when I needed match. But my brain kept these two concepts completely separate for a while. Then I had one of those eureka moments when something explained the magical syntax split // to split the string into solo characters. What a weird special-case, I had thought before. Now it seems so logical.
It makes sense that if s//-/g would insert dashes between each character, and m//g would happily return an array of nothings for each character, that split // should return the array of each character between all those nothings.
--
[ e d @ h a l l e y . c c ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: •Re: Regex - unordered lookaround syntax
by Anonymous Monk on Apr 29, 2003 at 04:56 UTC | |
by halley (Prior) on Apr 29, 2003 at 15:31 UTC |