Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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
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 exploiting the Monastery: (9)
As of 2014-12-27 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls