Zero-length Regular Expression Matches Considered Harmful

I was asked by a colleague why ⎕S reports two matches in the following example: (‘\d*’⎕S 0 1)’321’ ┌───┬───┐ │0 3│3 0│ └───┴───┘ Here we are asking for the position and length of sequences of zero or more digits in an input document containing three numeric characters. Intuitively there is just one match of all […]