RES: Regular expression question

2006-08-01 Thread Fabricio Soares Martins - Site CBN - SGR
Title: Regular expression question hi wagner,   try this:   #/perl -w   $file = 'c:\temp\zips\foo\foo2\foo3\ok.txt'; @pa = split (/\\/, $file);$file = $pa[$#pa];    for $i (0..($#pa-1)) {  $dir .= "$pa[$i]\\"; }   print "directory: $dir\n";print &

RE: Regular expression question

2006-08-01 Thread Joe Discenza
Title: Regular expression question Cai, Lucy (L.) wrote, on Monday, July 31, 2006 8:21 PM : My $file = "c:\temp\zips\ok.txt"; : How can I split the $file to get the only path: : My $dir = "c:\temp\zips"; : My $file = "ok.txt"; May I suggest you use File:Ba

RE: Regular expression question

2006-08-01 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Title: Regular expression question From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cai, Lucy (L.)Sent: Monday, July 31, 2006 17:21To: Cai, Lucy (L.); perl-win32-users@listserv.ActiveState.com; perl-unix-users@listserv.ActiveState.com; [EMAIL PROTECTED]; [EMAIL PROTECTED

Regular expression question

2006-08-01 Thread Cai, Lucy (L.)
Title: Regular expression question I have a file such as: My $file = "c:\temp\zips\ok.txt"; How can I split the $file to get the only path: My $dir = "c:\temp\zips"; My $file = "ok.txt"; Thanks in advance! Lucy __

Regular expression question

2006-08-01 Thread Cai, Lucy (L.)
Title: Regular expression question I have a file such as: My $file = "c:\temp\zips\ok.txt"; How can I split the $file to get the only path: My $dir = "c:\temp\zips"; My $file = "ok.txt"; Thanks in advance! Lucy __

Re: Regular expression question

2006-04-27 Thread Chris Wagner
At 09:45 PM 4/26/2006 -0400, Cai, Lucy \(L.\) wrote: >return (($Output =~ /.*\(ucmvob\)/s*$/) ? 1 : 0); >$Output ="/vobs/na_mscs_pvob >/ccstore/ecc/vobs_fcis321/na_mscs_pvob.vbs public (ucmvob,replicated)" > >What I want to do is if this tring include word "ucmvob", then return 1, >else re

Re: Regular expression question

2006-04-26 Thread Ted Schuerzinger
"Cai, Lucy (L.)" <[EMAIL PROTECTED]> graced perl with these words of wisdom: > return (($Output =~ /.*\(ucmvob\)/s*$/) ? 1 : 0); > > } > ** > > $Output ="/vobs/na_mscs_pvob > /ccstore/ecc/vobs_fcis321/na_mscs_pvob.vbs p

RE: Regular expression question

2006-04-26 Thread Timothy Johnson
Lucy (L.) Sent: Wednesday, April 26, 2006 6:46 PM To: perl-win32-users@listserv.ActiveState.com Cc: perl-win32-users@listserv.ActiveState.com Subject: Regular expression question Hi, all, I have a question about regular expression: my code is like this: ***

Regular expression question

2006-04-26 Thread Cai, Lucy \(L.\)
Hi, all, I have a question about regular expression: my code is like this: ** sub IsPVob { my ($Vob) = @_; my $Output = `cleartool lsvob $Vob`; die "IsPVob can't list vob $Vob" if $?; return

Re: A regular expression question -- Emergency

2005-09-30 Thread Richard A. Wells
$Bill Luebkert wrote: Richard A. Wells wrote: [...] The _expression_ $path_elem =~ s{(\s)}{\\$1}gio; The /io is not needed/wanted. Right about the /i. That's conventional laziness on my part, as it is usually what I want, though it would be detrimental in this

Re: A regular expression question -- Emergency

2005-09-30 Thread $Bill Luebkert
Richard A. Wells wrote: > $Bill Luebkert wrote: >> Richard A. Wells wrote: >> >>> [...] >>> >>> The expression >>> >>> $path_elem =~ s{(\s)}{\\$1}gio; >>> >> >> The /io is not needed/wanted. >> > Right about the /i. That's conventional laziness on my part, as it is > usually what I w

Re: A regular expression question -- Emergency

2005-09-30 Thread $Bill Luebkert
Richard A. Wells wrote: > On UNIX you have to escape the whitespace, e.g. > > /this path/has spaces > > would become > > /this\ path/has\ spaces > > The expression > > $path_elem =~ s{(\s)}{\\$1}gio; The /io is not needed/wanted. > should do the trick. > > Note that I used {} d

Re: A regular expression question -- Emergency

2005-09-30 Thread Richard A. Wells
On UNIX you have to escape the whitespace, e.g. /this path/has spaces would become /this\ path/has\ spaces The expression $path_elem =~ s{(\s)}{\\$1}gio; should do the trick. Note that I used {} delimiters (i.e. s{}{}) to make it clearer, since the data itself contains /s and som

Re: A regular expression question -- Emergency

2005-09-30 Thread Richard A. Wells
On UNIX you have to escape the whitespace, e.g. /this path/has spaces would become /this\ path/has\ spaces The expression $path_elem =~ s{(\s)}{\\$1}gio; should do the trick. Note that I used {} delimiters (i.e. s{}{}) to make it clearer, since the data itself contains /s and someone might

A regular expression question -- Emergency

2005-09-30 Thread Cai, Lucy \(L.\)
Hi All, I am meeting a problem on a regular expression. My code is like: $path_elem = "$ENV{'CLEARCASE_PN'}"; The return value of $path_elem is either $path_elem = /ccstore/test/test.pl Or $path_elem = /ccstore/test 1/test 1.pl # there is a space in the path name including the file name too

Re: A regular expression question

2004-11-12 Thread Ted Schuerzinger
$Bill Luebkert graced perl with these words of wisdom: >>>B. I want to get 1.62 from the string, how can I do it? >> >> >> Nobody seems to have answered part B. > > Actually they did. Sam's for one : > > $string = "sct-1.62-1"; > print "$1\n" if ($string =~ /^.+-(.+)-.+$/); You mean $1 capt

Re: A regular expression question

2004-11-11 Thread $Bill Luebkert
Ted Schuerzinger wrote: > Cai, Lixin (L.) graced perl with these words of wisdom: > > >>My $string = "sct-1.62-1"; >> >>I have 2 regular expression question here, >> >>A. I want to check whether the format is "XXX-XXX-XXX", how can I d

Re: A regular expression question

2004-11-11 Thread Ted Schuerzinger
Cai, Lixin (L.) graced perl with these words of wisdom: > My $string = "sct-1.62-1"; > > I have 2 regular expression question here, > > A. I want to check whether the format is "XXX-XXX-XXX", how can I do it? > B. I want to get 1.62 from the string,

RE: A regular expression question

2004-11-11 Thread Gardner, Sam
Title: Message or even. . .   $string = "sct-1.62-1";print "$1\n" if ($string =~ /^.+-(.+)-.+$/);   (no need to use the backslash escape for the dashes; they're not part of a character class. . .     Sam Gardner GTO Application Development

RE: A regular expression question

2004-11-11 Thread Peter Eisengrein
Title: A regular expression question Your format does not match XXX-XXX-XXX so I'll guess you mean three fields delimited by a dash.   here's one way to do it   $string = "sct-1.62-1"; print "$1\n" if ($string =~ /^.+\-(.+)\-.+$/)           -Origina

A regular expression question

2004-11-11 Thread Cai, Lixin \(L.\)
Title: A regular expression question  Now I have a string like My $string = "sct-1.62-1"; I have 2 regular _expression_ question here, A. I want to check whether the format is "XXX-XXX-XXX", how can I do it? B. I want to get 1.62 from the string, how can I do i

Re: regular expression question

2004-04-01 Thread Michael 'topdog' Thompson
Stacy Doss wrote: $a = "this is a (test)"; $a =~ s/\W+/_/g; HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:28 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: regular _expression_ qu

RE: regular expression question

2004-04-01 Thread Peter Guzis
PROTECTED]; [EMAIL PROTECTED] Subject: RE: regular expression question Thanks for the replying. I have another question, if I have a string like $a = "this is a (test)"; How can I change it to $a = "this_is_a_test"; How can I remove ()? Thanks Lixin -Original Messa

RE: regular expression question

2004-04-01 Thread Stacy Doss
$a = "this is a (test)"; $a =~ s/\W+/_/g; HTH -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:28 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: regular expression question Than

RE: regular expression question

2004-04-01 Thread Cai_Lixin
$Bill Luebkert Sent: Wednesday, March 31, 2004 8:27 PM To: [EMAIL PROTECTED] Subject: Re: regular expression question Wagner, David --- Senior Programmer Analyst --- WGO wrote: Hey guys - what's with the HTML ? > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > [

Re: regular expression question

2004-03-31 Thread $Bill Luebkert
Wagner, David --- Senior Programmer Analyst --- WGO wrote: Hey guys - what's with the HTML ? > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > [EMAIL PROTECTED] > Sent: Wednesday, March 31, 2004 16:49 > To: [EMAIL PROTECTED] > Subject: regular expression qu

RE: regular expression question

2003-03-28 Thread Cai_Lixin
Thanks Lixin -Original Message- From: Todd Hayward [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 12:26 PM To: [EMAIL PROTECTED] Subject: Re: regular expression question Borrowing from the previous example of: > open(fHandle, "myfile.txt|"); > while (defin

Re: regular expression question

2003-03-28 Thread viktoras
This works: open (INPUT ,"your_input.txt") || die "$!"; open (OUTPUT, "> your_output.txt") || die "$!"; while () { if (m/GENERIC_MULTILINE/) { $_="GENERATION 116 # Impossible dependency # Needed to prevent FC4700 to CX-series upgrades DEPEND Navisphere >2.0.0.0.0 DEPEND Navisphere <1.0.0.0.0 GEND

RE: regular expression question

2003-03-28 Thread Adam Frielink
> > I have another question, > > I have string like "> GENERATION 116", How can I get rid of ">", of the > string? If you want to remove the 1st character if it is a ">", then use this... $var =~ s/>//; $var =~ s/^>//; #This removes it only if it is the first character ___

RE: regular expression question

2003-03-28 Thread Gerber, Christopher J
3 11:58 AM > To: [EMAIL PROTECTED] > Subject: RE: regular expression question > > > I have another question, > > I have string like "> GENERATION 116", How can I get rid of > ">", of the > string? > > Thanks > > Lixin > >

RE: regular expression question

2003-03-28 Thread Cai_Lixin
do something} }; Hope this helps, NuTs - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 28, 2003 9:40 AM Subject: regular expression question > Dear all > > I have a txt file like the bottom (I use cleardiff

Re: regular expression question

2003-03-28 Thread thomas . baetzler
[EMAIL PROTECTED] schrieb: > I have a txt file like the bottom (I use cleardiff to > compare 2 files and > get this file): I would recommend that you look at Parse::RecDescent. Go grab the distribution from CPAN and have a look at the tutorial - the first example shows you how to parse a diff. h

regular expression question

2003-03-28 Thread Cai_Lixin
Dear all I have a txt file like the bottom (I use cleardiff to compare 2 files and get this file): I will check whether the line includes "___GENERIC_MULTILINE___" or not, if it includes, I will get the following information > GENERATION 116 > # Impossible dependency > # Needed to prevent FC47

Re: Beginner Regular Expression Question

2003-03-20 Thread C. Church
> Net::Telnet, and I want to match several possible strings that would make up > the prompts. An explanation below: > > '/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "or" '/tr[0-9][0-9]/' "or" > '/ber[0-9]/' > One way is: if($string =~ /(?:b|t|be|ma)r[0-9]{2}/) { ... } The operative operator

Beginner Regular Expression Question

2003-03-20 Thread Lupi, Guy
I am trying to figure out how to specify "or" in a regular expression. Basically, I am specifying the Prompt portion of a telnet session using Net::Telnet, and I want to match several possible strings that would make up the prompts. An explanation below: '/br[0-9][0-9]/' "or" '/mar[0-9][0-9]/' "o

Re: Another regular expression question

2003-03-20 Thread Carl Jolley
s [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 19, 2003 6:24 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: an regular expression question > > > On 3/19/2003 6:16 PM, [EMAIL PROTECTED] wrote: > > All, > > > > A question: > > A f

RE: Another regular expression question

2003-03-20 Thread Scott Purcell
inal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2003 9:28 AM To: [EMAIL PROTECTED] Subject: Another regular expression question Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; I want to get extension of the file name whic

Re: Another regular expression question

2003-03-20 Thread kadir
Hi! On 20 Mar 2003 at 10:28, [EMAIL PROTECTED] wrote: > Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; > > I want to get extension of the file name which is ndu, but I always > get 04.1.20.5.002-xlite_katana_free.ndu instead of ndu. : Try the code below. i think it works. Regards,

Re: Another regular expression question

2003-03-20 Thread Tobias Hoellrich
At 10:28 AM 3/20/2003 -0500, you wrote: Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu"; I want to get extension of the file name which is ndu, but I always get 04.1.20.5.002-xlite_katana_free.ndu instead of ndu. The sub is like: sub extension { my $path = shift; my $ext

Regular expression question

2002-12-12 Thread Mangesh
I want to translate some chaarcters in a string to its replacement string.   I am doing this. #** $inchar    = "\xa2\xa3";$outchar   = "\[Cent]\[Pound]"; eval "\$buf =~ tr/$inchar/$outchar/";   #$buf =~ s/$inchar/$outchar/; print

RE: regular expression question

2002-11-23 Thread Carl Jolley
On Fri, 22 Nov 2002, Stovall, Adrian M. wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Friday, November 22, 2002 4:38 PM > > To: Stovall, Adrian M.; [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subj

Re: regular expression question

2002-11-23 Thread Carl Jolley
On Fri, 22 Nov 2002 [EMAIL PROTECTED] wrote: > all, > > I want to check the first line of the file if it is machine or not, like > > The first line of the file is: > > Job "\nest and \toolbox VOBs" began execution on 9/6/02 at 2:00:11 AM. > > my code is like: > > if (!-z $file) > { > o

RE: regular expression question

2002-11-22 Thread Cai_Lixin
Yes, it works fine for me! Thanks a lot! Have a nice day. Lixin -Original Message- From: Stovall, Adrian M. [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 5:42 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: regular expression question > -Original Mess

RE: regular expression question

2002-11-22 Thread Stovall, Adrian M.
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 22, 2002 4:38 PM > To: Stovall, Adrian M.; [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: regular expression question > > > I tried that, it does

RE: regular expression question

2002-11-22 Thread Cai_Lixin
I tried that, it does not work for me! Lixin -Original Message- From: Stovall, Adrian M. [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 5:28 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: regular expression question Cai Lixin said: > > > all, >

RE: regular expression question

2002-11-22 Thread Stovall, Adrian M.
Cai Lixin said: > > > all, > > I want to check the first line of the file if it is machine > or not, like > > The first line of the file is: > > Job "\nest and \toolbox VOBs" began execution on 9/6/02 at 2:00:11 AM. > > my code is like: > > if (!-z $file) > { > open(LOG_FILE, "<

RE: regular expression question

2002-11-22 Thread Cai_Lixin
Sorry, I did not state quite clear, if it is machine or not, I want to say if I it is the right file or not... Lixin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 22, 2002 5:07 PM Cc: [EMAIL PROTECTED] Subject: regular expression question

regular expression question

2002-11-22 Thread Cai_Lixin
all, I want to check the first line of the file if it is machine or not, like The first line of the file is: Job "\nest and \toolbox VOBs" began execution on 9/6/02 at 2:00:11 AM. my code is like: if (!-z $file) { open(LOG_FILE, "<$file") or warn " can not open $file:$!\n";

RE: A regular expression question

2002-09-18 Thread Carlos Guillen
while (<>) { if ( /^#/ ){ print; } } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 3:12 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: A regular expression question

RE: A regular expression question

2002-09-12 Thread Jing Wee
r 12, 2002 3:12 PM >To: [EMAIL PROTECTED]; >[EMAIL PROTECTED]; >[EMAIL PROTECTED] >Subject: A regular expression question > > >I have a cron file which the line looks like this: > >00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S host-scrubber.pl" >#bui

RE: A regular expression question

2002-09-12 Thread Thomas_M
Cai_lixin wrote: > I want to get the comment after # of each line(not including > "#"), how could I do this? Depends. If you might have a # in a command, you'll want everything after the last #. If you're more likely to have another # in a comment, you want everything after the first #. (if you

Re: A regular expression question

2002-09-12 Thread Jing Wee
At 03:11 PM 9/12/2002 -0400, [EMAIL PROTECTED] wrote: >I have a cron file which the line looks like this: > >00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S host-scrubber.pl" >#build host scrubber >30 22 * * * perl -S queue_submit.pl esd-foundry "perl -S group-scrubber.pl" >#build group s

RE: A regular expression question

2002-09-12 Thread Peter Guzis
ROTECTED]] Sent: Thursday, September 12, 2002 12:12 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: A regular expression question I have a cron file which the line looks like this: 00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S host-scrubber.pl" #

RE: A regular expression question

2002-09-12 Thread Joseph P. Discenza
[EMAIL PROTECTED] wrote, on Thursday, September 12, 2002 3:12 PM : I have a cron file which the line looks like this: : : 00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S host-scrubber.pl" : #build host scrubber : 30 22 * * * perl -S queue_submit.pl esd-foundry "perl -S : group-scrubber.

RE: A regular expression question

2002-09-12 Thread Peter Eisengrein
Title: RE: A regular expression question foreach my $line () {     my ($comment) = $line =~ /^\#(.*)$/; }         > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 15:12 > To: [EMAIL PROTECTE

A regular expression question

2002-09-12 Thread Cai_Lixin
I have a cron file which the line looks like this: 00 22 * * * perl -S queue_submit.pl esd-foundry "perl -S host-scrubber.pl" #build host scrubber 30 22 * * * perl -S queue_submit.pl esd-foundry "perl -S group-scrubber.pl" #build group scrubber 30 22 * * * perl -S queue_submit.pl esd-foundry "per

Re: Regular Expression Question

2002-03-04 Thread Tim . Moose
Resending because I never saw the message post. Sorry if duplicate. Try this # my $text = "this is a website: www.hello-world.com and an e-mail: [EMAIL PROTECTED]"; @found = $text =~ m/\s+((?:[\w\d\-\~]{2,}[@|\.](?:[\w\d\-\~]{2,}\.?)+))/g; print "Fo

Regular Expression Question Correction

2002-03-04 Thread Joseph Youngquist
Sorry I sent the old version of the regular expression...the correct one is: m/\s+((?:[\w\d\-\~]{2,}[@|\.](?:[\w\d\-\~]{2,}\.?\@?)+))/g This one gets stuff like [EMAIL PROTECTED] Thanks again. PS..all you web folk out there...stick this under your pillow :) handy little RegEx..once its working

RE: Regular Expression Question

2002-03-04 Thread Joseph Youngquist
, Richard E. Sent: Monday, March 04, 2002 3:32 PM To: 'Joseph Youngquist'; [EMAIL PROTECTED] Subject: RE: Regular Expression Question I think that you may need to do this in a while loop: my @items while($text =~ m/your string here/g) { push @items, $1; } print join("\n&

RE: Regular Expression Question

2002-03-04 Thread Joseph Youngquist
tml. Thanks for the idea, I'll poke about with it...if no one sends a yes/no to the question above. Joe Y. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeffrey Sent: Monday, March 04, 2002 3:51 PM To: [EMAIL PROTECTED] Subject: RE: Regular Expression

Re: Regular Expression Question

2002-03-04 Thread Tim . Moose
02:23 PM To: <[EMAIL PROTECTED]> cc: Subject:Regular Expression Question Hello all, I hope some RegEx guru could answer why this stops once it finds the first occurrence of the expression. m/\s+((?:[\w\d\-\~]{2,}[@|\.](?:[\w\d\-\~]{2,}\.?)+))/g This is trying

Re: regular expression question

2001-06-01 Thread Rodney Wines
ctory name to be lib/, while dirname() considers the directory name to be . (dot). - Original Message - From: "Carl Campbell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, June 01, 2001 1:05 AM Subject: RE: regular expression

RE: regular expression question

2001-05-31 Thread Carl Campbell
ECTED]] Sent: Thursday, May 31, 2001 2:17 PM To: [EMAIL PROTECTED] Subject: regular expression question Dear all, I have a question about a regular expression, for example $OK = "c:\\temp\\test\\test1\\test2"; How can I do to make me get $OK1 = "c:\\temp\\test\\test1"; That

Re: regular expression question

2001-05-31 Thread Ron
: Thursday, May 31, 2001 5:17 PM Subject: regular expression question > Dear all, > I have a question about a regular expression, for example > $OK = "c:\\temp\\test\\test1\\test2"; > How can I do to make me get > $OK1 = "c:\\temp\\test\\test1"; > That means I do no

RE: regular expression question

2001-05-31 Thread Trever Furnish
Of > [EMAIL PROTECTED] > Sent: Thursday, May 31, 2001 4:17 PM > To: [EMAIL PROTECTED] > Subject: regular expression question > > > Dear all, > I have a question about a regular expression, for example > $OK = "c:\\temp\\test\\test1\\test2"; > How can I do to make me

regular expression question

2001-05-31 Thread Cai_Lixin
Dear all, I have a question about a regular expression, for example $OK = "c:\\temp\\test\\test1\\test2"; How can I do to make me get $OK1 = "c:\\temp\\test\\test1"; That means I do not want the last part of the directory. Thanks in advance! Lixin ___ P

Re: Regular Expression question

2001-03-02 Thread Ron Grabowski
> This works great, but now I need to add an (AND, OR) search ability to my > search. $query->{Find} =~ /^(.+?)\s+(and|or)\s+(.+?)$/i; $sql = "SELECT bla, bla FROM table WHERE column LIKE '$1' $2 '$3'" Of course you'll have to tweak that so a user doesn't enter something like and foo foo and

RE: Regular Expression question

2001-03-02 Thread Joseph P. Discenza
(un-jeopardied) Wagner-David wrote, on Friday, March 02, 2001 13:08 : steve silvers [mailto:[EMAIL PROTECTED]] wrote : > Say I search on (perl and oracle). : > : > if ($query->{Find} =~ /and/i) { : > Run my sql statement ie: perl and oracle : > } : > : > if ($query->{Find} =~ /or/i) { : >

Re: Regular Expression question

2000-11-21 Thread Jon Bjornstad
steve silvers wrote: > I'm calling a bunch of rows from my database. > In the while loop. > > while(my $Dataref = $sth->fetchrow_hashref) { >my %Data = %{$Dataref}; >my $text = ($Data{val}); > > $text = (/(www\.[\w\.\-\/\&\=\+\%\:\?]*[a-zA-Z\/0-9])[\001\074]*/) >

Regular Expression question

2000-11-21 Thread steve silvers
Im calling a bunch of rows from my database. In the while loop. while(my $Dataref = $sth->fetchrow_hashref) { my %Data = %{$Dataref}; my $text = ($Data{val}); $text = (/(www\.[\w\.\-\/\&\=\+\%\:\?]*[a-zA-Z\/0-9])[\001\074]*/) $emailaddress = $1; print

Re: Regular Expression question

2000-10-05 Thread Nikola Knezevic
> I am curious, why does this exact same question keep showing up, from > different people (I believe) and with a spaced regularity over and over > again? I don't know, but you are right. The most FAQ is : How to send attachments? The second place is reserved to: How to fetch rows? The third : Ho