Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Regex: Matching last of repeated character to end of string

by loris (Hermit)
on Nov 04, 2005 at 12:16 UTC ( [id://505682]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $xpath = 'BoringNode[1]/InterestingNode[@InterestingAttribute="outg
    +rabe"]/AnotherBoringNode[5]';
    $xpath =~ s|\/(.*?)$||;
    print $xpath . "\n";
    
  2. or download this
    BoringNode[1]/InterestingNode[@InterestingAttribute="outgrabe"]
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2025-03-17 05:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (54 votes). Check out past polls.