Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Using regex to match double letters, and only double letters

by ysth (Canon)
on Dec 30, 2005 at 10:29 UTC ( #519972=note: print w/replies, xml ) Need Help??


in reply to Re: Using regex to match double letters, and only double letters
in thread Using regex to match double letters, and only double letters

Lots of things you can do with backreferences. Even check for primes:
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
(by Abigail)
  • Comment on Re^2: Using regex to match double letters, and only double letters
  • Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (1)
As of 2020-10-25 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (249 votes). Check out past polls.

    Notices?