in reply to Matching two real numbers in a string using regex

Why use a regex for this at all, when a simple split will do?
my($FirstNo, $SecondNo) = split /to/; Much more simple, IMHO.

Replies are listed 'Best First'.
Re^2: Matching two real numbers in a string using regex
by Flexx (Pilgrim) on Sep 06, 2002 at 14:45 UTC
    Since this would allow wantoeat? to be input? Anyway, for a quick shot you certainly got a point.. ;)
      Right. But without sample input, who's to know if that is likely? <grin>
        Right. But Anonymous Monk actually gave us some sample input in his question (so my objection was, ahh, truly theoretical.. ;)