Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: split on zero-length pattern

by tinita (Parson)
on Nov 26, 2010 at 11:30 UTC ( #873839=note: print w/replies, xml ) Need Help??

in reply to Re^2: split on zero-length pattern
in thread split on zero-length pattern

You are searching for "something preceeded by".
First, that is something *positive*. Why do you want to use a a negative look-around? You are searching for something that is preceeded by, not for something that is *not* preceeded by.
Second, a look-ahead looks *ahead* for the pattern specified (update: maybe better put: looks if the specified pattern is ahead of the look-ahead assertion). For every look-around in perlre there is a short example given. The example for negative look-behindahead is /foo(?!bar)/, saying "match a foo that is *not* *followed* by "bar". So in your code you said effectively "match anything that is not followed by a dot and a digit".

Replies are listed 'Best First'.
Re^4: split on zero-length pattern
by rovf (Priest) on Nov 26, 2010 at 12:39 UTC

    Now I got it!!!! Thanks a lot for your patient explanation!

    Ronald Fischer <>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873839]
[erix]: Harakiri with a nuke on the white house, that'd clean up the staff there a bit too ;)
[erix]: (sorry, I'm always a bit violent on fridays)
LanX predicts problems for Erix next time he lines up at an US immigration counter
[erix]: but tuesdays just as bad
[erix]: thanks for the heads-up but that's a line-up studiiously avoided :P
[LanX]: yeah too far for someone who can't even make it to Amsterdam
LanX looking for a good magit tutorial

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2017-08-18 13:16 GMT
Find Nodes?
    Voting Booth?
    Who is your favorite scientist and why?

    Results (302 votes). Check out past polls.