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

Re: Another regex to solve ...

by Not_a_Number (Parson)
on Aug 18, 2011 at 17:58 UTC ( #921033=note: print w/ replies, xml ) Need Help??


in reply to Another regex to solve ...

my @tests = qw/ p up hip hop hoop heap help hops /; for ( @tests ) { say if reverse =~ /^p([aeiou])(?!\1)/; }


Comment on Re: Another regex to solve ...
Download Code
Re^2: Another regex to solve ...
by pat_mc (Pilgrim) on Aug 19, 2011 at 19:44 UTC
    Gooooood thinking, Not_a_Number!!!!

    I like this one ... reversing the string before matching it ... how neat is that? Excellent! Goooood on ya! And thanks for the idea. This is coooooool stuff!

    And who ever said 'regex golfing was a waste of time'? Far from it ... it's like Perl philosophy ... pure aesthetics ... sheer bliss. Thanks agani for this near little twist!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-12-28 01:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (177 votes), past polls