Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

sexeger

by japhy (Canon)
on Sep 21, 2000 at 01:56 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found