[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Could be fun(ny|nier)?



On Tue, May 02, 2000 at 03:24:54PM -0400, Bill Jones wrote:
> Is there away to combine these?
> 
> /^[ ]*[+-]?\d+[ ]*$/;
> 
> /^[ ]*[+-]?\d*\.?\d*([eE][+-]?\d+)?[ ]*$/;

Something like this?


/^ *[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)? *$/;


I went for the easy solution that uses alternation.


Ronald


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe