in reply to Re^2: pull out num from str
in thread pull out num from str

Well, it's "better" in the sense that it doesn't match on a sequence of digits thrown together from a couple of handful of different scripts.

But I posted it mainly to point you to the Regexp::Common module. Useful if you need patterns for common tasks, but you aren't able to write them yourself without asking on the internet.

Replies are listed 'Best First'.
Re^4: pull out num from str
by icoder (Novice) on Apr 24, 2012 at 05:33 UTC
    okay.Yes ..I want to get anyother better way to do it without any failure cases for tests,that is why asked for suggestion.