Help for this page

Select Code to Download


  1. or download this
    C:\>perl -E "my $num ='abcd23.5fghi';if ($num =~ /[a-z]+(.*?)[a-z]/i){
    + say $1;}"
    23.5                                                      /^\
    
  2. or download this
    C:\>perl -E "my $num ='abcd23.5fghi';if ($num =~ /[a-z]+(.*)[a-z]/i){ 
    +say $1;}"
    23.5fgh    # not what OP seems to want
    
  3. or download this
    C:\>perl -E "my $num ='abcd23fghi'; my $intermediate; if ($num =~ /[a-
    +d]+(\d+)[f-z]+/) {$intermediate = $1;} if ($intermediate =~ /[0-9]+/ 
    +){ say $intermediate;}"
    23
    
  4. or download this
    C:\>perl -E "my $num ='abcd23.777fghi'; my $intermediate; if ($num =~ 
    +/[a-d]+(\d+)[f-z]+/) {$intermediate = $1;} if ($intermediate =~ /[0-9
    +]+/ ){ say $intermediate;}"
    (no output)