Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

sexeger

by japhy (Canon)
on Sep 21, 2000 at 01:56 UTC ( #33410=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    ($last_numbers) = $string =~ /(\d+)(?!\D*\d)/;
    
  2. or download this
    $last_numbers = scalar reverse(  # reverse the match
      reverse($string) =~            # reverse the input string
      /(\d+)/                        # reverse the regex
    );
    
  3. or download this
    $CODE =~ m{
      \A
    ...
      )*
      \z
    }x;
    
  4. or download this
    <this is a sample program> int x = 10;
    <what a silly grammar> str y = "cool \" beans";
    ...
      chop(y,x);   
      print "I sliced 'y' down to ", x, " characters for you";
    }
    
  5. or download this
    ($last_comment) = $CODE =~ m{
      \A
    ...
      (?: "[^"\\]*(?:\\.[^"\\]*)*" | (?>[^"<>]*) )*
      \z
    }x;
    
  6. or download this
    $last = scalar reverse(reverse($CODE) =~ m{
      \A
    ...
      (?: "(?:[^"\\]*.\\)*[^"\\]*" | (?>[^"<>]*) | >[^>]*< )*
      \z
    }x);
    
  7. or download this
    ($last_comment) = $CODE =~ m{
      (<[^>]*>)
      (?: "[^"\\]*(?:\\.[^"\\]*)*" | (?>[^"<>]*) )*
      \z
    }x;
    
  8. or download this
    $last = scalar reverse(reverse($CODE) =~ m{
      \A
      (?: "(?:[^"\\]*.\\)*[^"\\]*" | (?>[^"<>]*) )*
      (>[^>]*<)
    }x);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://33410]
Approved by holli
Front-paged by holli
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2015-07-08 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (96 votes), past polls