Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: most terse regex match count

by Fletch (Bishop)
on May 16, 2019 at 15:32 UTC ( [id://11100102]=note: print w/replies, xml ) Need Help??


in reply to most terse regex match count

You want 3/4ths of the operator which shall not be named and some extra parens.

if( 2 == ( ()= $outs =~ m|A|gs ) ){ print "exactly 2 matches\n" }

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-25 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found