Re: regular exp

2004-07-21 Thread Jenda Krynicky
From: jack jack <[EMAIL PROTECTED]> > I have 2 variables $last_accessed and $owner_line > > $last_accessed=": Last accessed 20-Apr-04.12:57:30 by > [EMAIL PROTECTED]"; > > $owner_line="Owner: opc_bld : rwx (all)"; > > -From $last_accessed i want the foll output in > variables : > > $vi

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

Re: regular exp problem

2003-03-05 Thread Ramprasad
Rob Dixon wrote: Ramprasad wrote: I have a str that contains the base64 encoded string of a mail. Now this string should not contain any characters with ascii values above 128. Can i write a regex to check this Assuming you mean 'above 127' you can use the POSIX ASCII character class: die "I

Re: regular exp problem

2003-03-05 Thread Rob Dixon
Ramprasad wrote: > I have a str that contains the base64 encoded string of a mail. Now > this string should not contain any characters with ascii values above > 128. Can i write a regex to check this Assuming you mean 'above 127' you can use the POSIX ASCII character class: die "Invalid chara

Re: regular exp

2002-08-20 Thread David Richardson
Perl has a file globbing operator for situations like this. try @projectFilesExist = <$ja\{*.dsp,*.vbp}>; print "proj already exist\n" if @projectFilesExist; < > returns an array of files matching the pattern between the angle brackets. The @projectFilesExist will be convert to scala