Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Regex for outside of brackets

by theravadamonk (Scribe)
on Jul 13, 2018 at 17:45 UTC ( [id://1218458]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex for outside of brackets
in thread Regex for outside of brackets

Thanks a lot

here's my easy code

#!/usr/bin/perl use strict; use warnings; my $string ="THIS IS OUTSIDE (THIS IS INSIDE)"; print "\n"; print "string: $string"; print "\n"; #(my $new_string = $string) =~ s/^([^(]*)/THIS_IS_OUTSIDE_CAPTURED/g; (my $new_string = $string) =~ s/^([^(]*)//g; print "\n"; print "new_string: $new_string"; print "\n\n";

Log In?
Username:
Password:

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

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

    No recent polls found