On 07/12/2006 05:08 PM, Ryan Moszynski wrote:
I need to write some code to allow users to specify which of a whole
bunch of elements(e.g.512/1024) that they want to view.  My idea for
how to do this was to have them input a semicolon delimited list, for
example:

1-10;25;33;100-250


i tried using this to check to make sure they input a valid list that
i can process: [...]

    $str =~ m/^((\d+-\d+|\d+);?)+$/g;

However, this does not consider 250-100 to be invalid.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to