in reply to Regex help for printing alphanumeric

Hi there, 'MMM 3.3' is certainly not alphanumeric. Alphanumeric could be defined as a 'sequence' of alphabets combined with digits. However, if you do wish to match this in a regexp, below is the specific regexp for this particular pattern only, i.e. alpha float-number:
/[A-Za-z]+ [0-9]+\.[0-9]+/

Hope this helps! Sumeet.

Replies are listed 'Best First'.
Re^2: Regex help for printing alphanumeric
by Anonymous Monk on Oct 28, 2011 at 17:25 UTC

    Actually my input is wrong...there is no space ,instead there is a ".",it still doesnt print,basically I want to print anything after Info: Product Line is

    use warnings; foreach my $match ('Info: Product Line is MMS.3.3') { if ( $match =~ /Info: Product Line is (\w+)/ ) { $product_line = $1; print "$product_line\n"; } }