If i understood your question correctly, this will work. Recently Roy Johnson has explained about this in his tutorial Using Look-ahead and Look-behind which will help you to understand '?=' etc.
$str = 'abc dddd 10 '; ($number) = $str =~ /(\d+)\s*$/; print "$number";
Prasad
In reply to Re: regexp: extracting info
by prasadbabu
in thread regexp: extracting info
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |