Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

holli's scratchpad

by holli (Abbot)
on Dec 10, 2004 at 15:12 UTC ( #413874=scratchpad: print w/replies, xml ) Need Help??

use strict; use warnings; my $test = "{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}="; # All you need to do is to escape the braces print "Yay" if $test =~ /\{[^\{\}]+\}\{[^\{\}]+\}\{[^\{\}]+\}\{[^\{\}] ++\}\{([^\{\}]+)\}\{([^\{\}]+)\}\{[^\{\}]+\}\{[^\{\}]+\}\{[^\{\}]+\}\{ +[^\{\}]+\}=/; # better that is nicer written as (DRY. Dont Repeat Yourself) print "Yay" if $test =~ / (:? \{ # literal left brace [^ \{ \} ]+ # everything but braces \} # literal right brace ){10} # all of the above then times = # followed by a literal equal sign /x; # x ignores whitespace
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2020-05-27 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (154 votes). Check out past polls.

    Notices?