in reply to Re: split on zero-length pattern
in thread split on zero-length pattern
Hmmm... a negative look-ahead looks backwards, isn't it? So I thought it should be the correct one. For example, in the string '12345.6789.0', the first split point should be after the 6, i.e. giving 1245.6 as first element. Hence my idea goes like this: To the *left* of the split point must be a period, followed by a digit. The regexp engine needs to look back, so I thought it is negative look-ahead. Did I misunderstand here the explanations in perlre?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: split on zero-length pattern
by tinita (Parson) on Nov 26, 2010 at 11:30 UTC | |
by rovf (Priest) on Nov 26, 2010 at 12:39 UTC |