The regular expression // works differently in split then elsewhere
I think it is actually the other way around — in most contexts, m// is special (it refers to the most recent pattern without duplicating that pattern), while in split, // is literally the empty regex, which matches the zero-length empty string.
In reply to Re^4: Why split function treats single quotes literals as regex, instead of a special case?
by jcb
in thread Why split function treats single quotes literals as regex, instead of a special case?
by likbez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |