Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: can u suggest a regex for this ?

by tybalt89 (Monsignor)
on Feb 03, 2023 at 17:32 UTC ( [id://11150142]=note: print w/replies, xml ) Need Help??


in reply to can u suggest a regex for this ?

Scalar without /r

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11150123 use warnings; my $blockoftext = <<END; mouse cat 1 2 3 ^cat deer eel cat furbaby elk ^cat dog fish END $blockoftext =~ s/^cat.*?^\^cat/ my $catsection = $&; $catsection =~ s!^!#!gm; $catsection /gems; print $blockoftext;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-26 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found