Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-10 Thread Paul
--- Craig Moynes/Markham/IBM <[EMAIL PROTECTED]> wrote: > [snip . . . ] > The number of mini-regexp differs depending on the date format line > the user enters. So i find out how make keys there are (thus the > number of mini-regexps) and try to construct a string that will print > out whatever

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-09 Thread Brett W. McCoy
On Wed, 9 May 2001, Craig Moynes/Markham/IBM wrote: > I know there are plenty of wonderful Date manipulators (Date::Calc would > simply my life unimaginably) but I am still waiting to hear back from our > Legal Dept. regarding the use of the modules. I know that I should be > allowed to use them

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-09 Thread Craig Moynes/Markham/IBM
Thanks, I know there are plenty of wonderful Date manipulators (Date::Calc would simply my life unimaginably) but I am still waiting to hear back from our Legal Dept. regarding the use of the modules. I know that I should be allowed to use them considering the modules found as part of perl often

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Matt Cauthorn
Not sure if this will help you at this point, but I strongly recommend the Date::Manip module for anything involving parsing dates. It does everything you can imagine with dates and more. Tell it to parse your dates, and boom you can print them however you want, get differences, etc. There are ple

Re: Regexp: Grouping and replacing with an unknown number of groups-- SOLVED

2001-05-08 Thread Craig Moynes/Markham/IBM
Perfect, thanks. I think I saw that earlier ...stupid brain :) - Craig Moynes Internship Student netCC Development IBM Global Services, Canada Tel: (905) 316-3486 [EMAIL PROTECTED]

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Me
Tip for those posting (or even just creating) long regexes: If you stick a /x on the end of a regex, whitespace in the regex is ignored, so you can break it up into multiple lines, indent lines as appropriate, add spaces where nice, and comments, etc. One thing to remember if you do this: white s

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Brett W. McCoy
On Tue, 8 May 2001, Craig Moynes/Markham/IBM wrote: > $values =~ s/.*$self->{DF_REGEXP}.*/$replaceString/g; Perhaps you actually want: @values_arr = $values =~ /.*$self->{DF_REGEXP}.*/ This will give you an array of the atomized matches in your regexp, and you don't need to fool around with th

Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Craig Moynes/Markham/IBM
Continuing with the problems for my 'date formatting' script. I am reading in a complete record from a logfile. I check to see if the regexp matches to something inside the record. Then I want to find the what each grouped mini-regexp matched up with in the monster one at the bottom of the email