Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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 <ynnor@mm.st>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://873839]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-07-31 08:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls