Re: Regular Exp for Numerics

2004-01-12 Thread Rob Dixon
Hi Mallik. You asked this question yesterday. Here is a copy of my answer to yesterday's post. Rob Mallik wrote: > > I have to compare numeric values as below > > if (($segsep == 13) || ($segsep == 10) || ($segsep == 0)) > > Can I use the reg exp as below > > if ($segsep =~ /^(13|10|0)$/) > > M

Re: Regular Exp for Numerics

2004-01-11 Thread Rob Dixon
Mallik wrote: > > I have to compare numeric values as below > > if (($segsep == 13) || ($segsep == 10) || ($segsep == 0)) > > Can I use the reg exp as below > > if ($segsep =~ /^(13|10|0)$/) > > My question is, is it adviceable to use reg exp for numeric values (entire > value). > If yes, why? > If