Re: Regrex Question

2013-11-25 Thread shawn wilson
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

Re: Regrex Question

2013-11-25 Thread Mike Blezien
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

Re: Regrex Question

2013-11-25 Thread Jim Gibson
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

Re: Regrex Question

2013-11-25 Thread Peter Gordon
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

Re: Regrex Question

2013-11-25 Thread timothy adigun
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

Regrex Question

2013-11-25 Thread Mike Blezien
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

Re: Regrex question

2001-05-23 Thread Matt Cauthorn
$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

Re: Regrex question

2001-05-23 Thread Paul
--- 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

Re: Regrex question

2001-05-23 Thread Jeff Pinyan
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

Re: Regrex question

2001-05-23 Thread Timothy Kimball
: ### 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,

Regrex question

2001-05-23 Thread David Gilden
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=~