Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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]
and the voices are still...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2018-03-20 04:27 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (247 votes). Check out past polls.