in reply to How can i extract a number from an string

Consider a regular expression. There is also the Perl regular expressions quick start and the tutorial. If you are going to mess about with Perl, you ought to get to grips with regular expressions.

In particular, consider a regular expression using a "capture". (Update: as demonstrated by some quicker monks.)

  • Comment on Re: How can i extract a number from an string