mickalo)Blezien
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Thunder Rain Internet Publishing
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> - Original Message -
> From: Jim Gibson
> To: Perl List
> Sent: Monday, November 25, 2013 1:23 PM
> Subject: Re: Regrex Question
>
>
> On Nov 25
Gibson
To: Perl List
Sent: Monday, November 25, 2013 1:23 PM
Subject: Re: Regrex Question
On Nov 25, 2013, at 10:55 AM, Mike Blezien wrote:
> Hello,
>
> Regular expression have never been my strong suite so hoping to get a litte
help with a line in file I need to
On Nov 25, 2013, at 10:55 AM, Mike Blezien wrote:
> Hello,
>
> Regular expression have never been my strong suite so hoping to get a litte
> help with a line in file I need to extract a portion of it.
>
> The text I need to extract from this line is "November 21, 2013" from this
> line in t
On Mon, 25 Nov 2013 12:55:35 -0600, Mike Blezien wrote:
>Hello,
>
>Regular expression have never been my strong suite so hoping to get
>a litte help with a line in file I need to extract a portion of it.
>
>The text I need to extract from this line is "November 21, 2013"
>from this line in the file
Hi,
On Mon, Nov 25, 2013 at 7:55 PM, Mike Blezien wrote:
> Hello,
>
> Regular expression have never been my strong suite
>
You might have to make it one. :)
> so hoping to get a litte help with a line in file I need to extract a
> portion of it.
>
> The text I need to extract from this line
Hello,
Regular expression have never been my strong suite so hoping to get a litte
help with a line in file I need to extract a portion of it.
The text I need to extract from this line is "November 21, 2013" from this line
in the file, just the date:
Posted by mailto:someem...@email.com";>Some
$test=~ s/(dav)/$1 Smith/ig;
print "$test
";
gives the following result:
dav Smithe Dav Smithid Dav Smithy
###
$test=~ s/(dav)w+/$1 Smith/ig;
Gives us: dav Smith Dav Smith Dav Smith
The \w+ says "one or more word characters". Sticking that on the end gave us a bit
more control over the resul
--- David Gilden <[EMAIL PROTECTED]> wrote:
> $test = "dave David Davy";
>
> ### Does not work want to count the number of matches...
> $regex= ($test=~ s/(dav)/$i++ $1/eig);
Just counting? Don't use s///. Try this:
my @regex = $test =~ /(dav)/g; # returns list of all matches
$i = sca
On May 23, David Gilden said:
>#!/usr/bin/perl
>
>$test = "dave David Davy";
>
>$i=0;
>
>### Does not work want to count the number of matches...
>$regex= ($test=~ s/(dav)/$i++ $1/eig);
>
>print "$regex $i\n";
Do you want to count matches, or change the string? If you just want to
count th
: ### Does not work want to count the number of matches...
: $regex= ($test=~ s/(dav)/$i++ $1/eig);
:
: print "$regex $i\n";
:
: ### This does work..
: $regex= ($test=~ s/(dav)/$1 Smith/ig);
:
: print "$regex\n";
:
: __END__
:
:
: It looks like $regex contains the number of matches,
Hello,
Thanks for all the help this list is providing,
Here is today's problem:
#!/usr/bin/perl
$test = "dave David Davy";
$i=0;
### Does not work want to count the number of matches...
$regex= ($test=~ s/(dav)/$i++ $1/eig);
print "$regex $i\n";
### This does work..
$regex= ($test=~
11 matches
Mail list logo