Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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".

Comment on Re^3: split on zero-length pattern
Download Code
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]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-11-26 18:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (705 votes), past polls