Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Deleting everything before a string

by Cybercosis (Monk)
on Dec 21, 2000 at 15:05 UTC ( [id://47765]=note: print w/replies, xml ) Need Help??


in reply to Deleting everything before a string

Okay, this is going to be evil. (note to self: don't program in Perl after learning Standard ML...) but it (might) be somewhat faster, since there's no regex stuff:
my $first_index = index($content, "+_"); my $second_index = index($con +tent, "+_", $first_index); $content = substr($first_index, $first_index - $second_index);
Okay, that wasn't so bad... my Perl instincts almost raged against this, which may not even work:
$content = substr($content, index($content, "+_")+2, index($content, " ++_") - index($content, "+_", index($content, "+_")+1)-4);
*shudder* damn functional languages... =-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-19 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found