Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: How can I extract part of a string after a specific character

by DamnDirtyApe (Curate)
on Jul 11, 2002 at 05:13 UTC ( [id://180946]=note: print w/replies, xml ) Need Help??


in reply to How can I extract part of a string after a specific character

Here's two ways:

my $str = 'TITLE=SPECIAL CASE 1' ; # Using a regexp... $str =~ /^(.*?)=(.*?)$/ ; my $match = $2 ; print "Matched: [$match]\n" ; # Using split... my ( $before, $after ) = split '=', $str ; print "Matched: [$after]\n" ;

_______________
D a m n D i r t y A p e
Home Node | Email

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-03-28 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found