Help for this page

Select Code to Download


  1. or download this
    $text =~ /\b(\d+)/
    
  2. or download this
    if ($text =~ /\b(\d+)\b/) {
       print("Matched $1\n");
    }
    
  3. or download this
    # The first standalone number.
    $text =~ /\b(\d+)\b/
    
  4. or download this
    # By context.
    $text =~ /(\d+) months? old/
    
  5. or download this
    # The last number.
    $text =~ /^.*\b(\d+)/