RE: RegExp help

2005-11-04 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sekhar kavuru Sent: 03 November 2005 17:00 To: activeperl@listserv.ActiveState.com Cc: $Bill Luebkert; [EMAIL PROTECTED] Subject: RegExp help > my $str = "/install/sql/foo.c; > > from $str string I need to get

Re: RegExp help

2005-11-03 Thread JPerlmutter
>, [EMAIL PROTECTED] Subject RegExp help my $str = "/install/sql/foo.c; from $str string I need to get "/install/sql/ Any help $Bill Luebkert <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > > how about we find your start and work forward? Brian did the end and w

RegExp help

2005-11-03 Thread sekhar kavuru
my $str = "/install/sql/foo.c;   from $str string I need to get "/install/sql/   Any help$Bill Luebkert <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote:> > how about we find your start and work forward? Brian did the end and work > backward, but i always like trying to find an alternative way t

Re: RegExp help

2005-11-03 Thread $Bill Luebkert
sekhar kavuru wrote: > my $str = "/install/sql/foo.c; > > from $str string I need to get *"/install/sql/ * > > Any help use File::Basename or you can use a RE: (my $dir = $str) =~ s/[^\/]+$//;# remove any non /s from end of string ___ Acti

Re: RegExp help

2005-10-28 Thread $Bill Luebkert
[EMAIL PROTECTED] wrote: > > how about we find your start and work forward? Brian did the end and work > backward, but i always like trying to find an alternative way to look at > things. i found it's normally easier for me. > > if we know it will always have one or more / in front, but start e

re: RegExp help

2005-10-28 Thread JPerlmutter
I did read them all. I think Brian Raven's subroutine you can place in a package is one of the better ideas, but something I like to do i did not see done, So i would like to chime in, in the hopes that I can help in teaching some regexp here. -quoted-- From: sekhar kavuru <[EMA

Re: RegExp help

2005-03-16 Thread David Laulusa
This regex is better than mine, because * is greedy and will gobble everything till the last "-" matched, not the first one. I momentarily forgot about that. :) This will handle that situation where there is multiple "-" characters within the string, but you only want to delete everything up un

Re: RegExp help

2005-03-16 Thread pDale Campbell
Wagner, David --- Senior Programmer Analyst --- WGO wrote: > [EMAIL PROTECTED] wrote: > I don't write regular expressions...ever... > > So can someone give me a regular expression that will remove all of > the characters at the start of a string up to and including a "-" > (without quotes). s/^[^

Re: RegExp help

2005-03-16 Thread Hans-Werner Heinl
Hi, $foo=~ s/.*a-(.*)/\1/ ; should work. - Original Message - From: "Chris Cappelletti" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 16, 2005 7:57 PM Subject: RegExp help I don't write regular expressions...ever... So can someone give me a regular expression th

Re: RegExp help

2005-03-16 Thread David Laulusa
$string =~ s/^.*-// ; Chris Cappelletti wrote: I don't write regular expressions...ever... So can someone give me a regular expression that will remove all of the characters at the start of a string up to and including a "-" (without quotes). Chris Cappelletti IT Programmer/Analyst, Sr. TTM Technol

RE: RegExp help

2005-03-16 Thread Chris Cappelletti
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of pDale Campbell Sent: Wednesday, March 16, 2005 11:28 AM To: ActivePerl@listserv.ActiveState.com Subject: Re: RegExp help Chris Cappelletti wrote: > I don't write regular expressions...ever... Then you're probably using the wrong lan

RE: RegExp help

2005-03-16 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > I don't write regular expressions...ever... > > So can someone give me a regular expression that will remove all of > the characters at the start of a string up to and including a "-" > (without quotes). s/^[^-]*-//g; Should handle abc-123 or -1234 and g

Re: RegExp help

2005-03-16 Thread pDale Campbell
Chris Cappelletti wrote: I don't write regular expressions...ever... Then you're probably using the wrong language. So can someone give me a regular expression that will remove all of the characters at the start of a string up to and including a "-" (without quotes). $title =~ s/^[^-]*-//; -- pDal

RegExp help

2005-03-16 Thread Chris Cappelletti
I don't write regular expressions...ever... So can someone give me a regular expression that will remove all of the characters at the start of a string up to and including a "-" (without quotes). Chris Cappelletti IT Programmer/Analyst, Sr. TTM Technologies Desk: 425-202-9326 Cell: 425-246-8295

regexp help

2001-11-16 Thread Joe Barnes
Is there a way to use a scalar variable inside of the search string of a regexp? I have a web site that has data posted to it containing different boundaries variables each time something is posted. I want to substitute within the post starting at a known string to the first occurrence of the bo