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

Re^2: How to use a negative backreference in regex?

by larryk (Friar)
on Mar 02, 2009 at 22:01 UTC ( #747557=note: print w/ replies, xml ) Need Help??


in reply to Re: How to use a negative backreference in regex?
in thread How to use a negative backreference in regex?

thanks - it's been a while :)

I eventually ended up with the following:

my $unique = qr/^(.)(?!\1) (.)(?!\1|\2) (.)(?!\1|\2|\3) .$/x;
   larryk                                          
perl -le "s,,reverse killer,e,y,rifle,lycra,,print"


Comment on Re^2: How to use a negative backreference in regex?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (12)
As of 2014-12-18 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (44 votes), past polls