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
>, [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
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
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
[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
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
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
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/^[^
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
$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
: [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
[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
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
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
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
15 matches
Mail list logo