RE: Simple regex question

2009-05-19 Thread Ajay Kumar
Hi Alexander Or you can use this ($temp=~ m/([A-Za-z0-9]{5})\.([0-9]{1,2})[+-]([0-9]{1,4})\.([0-9]{1,4})/); This is more compact and accurate Thanks and regards Ajay -Original Message- From: Alexander Koenig [mailto:alexander.koe...@mpi.nl] Sent: Tuesday, May 19, 2009 7:25 PM To: beginn

Re: perl on windows

2009-05-19 Thread Dr.Ruud
Sharan Basappa wrote: Ruud: Sharan Basappa wrote: Ruud: Sharan: I would like to know install perl on my windows laptop. Any suggestions on which one to use. Strawberry Perl http://vanillaperl.com/ I downloaded strawberry and extracted it. I dont see any install notes. Any idea how to i

Re: Simple regex question

2009-05-19 Thread John W. Krahn
Dan Fish wrote: Simple question for the regEXperts out there... I have a string that is always in the format: a.nn+x.y a is always 5 chars [a-zA-Z0-9]{5} n can be 1 or 2 digits [0-9]{1,2} x can be +/- (with sign), 1-4 digits [-+][0-9]{1,4} y is always positive (no sign), 1

Re: Simple regex question

2009-05-19 Thread John W. Krahn
Chas. Owens wrote: On Tue, May 19, 2009 at 09:55, Alexander Koenig wrote: snip ($a,$n,$x,$y)) = $item =~ /(.{5})\.(\d\d?)[-+](\d{1,4})\.(\d{1,4})/; snip As of Perl 5.8 \d no longer matches [0-9]. ^ As of Perl 5.8 \d no longer matches only [0-9].

Re: Simple regex question

2009-05-19 Thread John W. Krahn
Dan Fish wrote: Simple question for the regEXperts out there... I have a string that is always in the format: a.nn+x.y a is always 5 chars [a-zA-Z0-9]{5} n can be 1 or 2 digits [0-9]{1,2} x can be +/- (with sign), 1-4 digits [-+][0-9]{1,4} y is always positive (no sign), 1

Re: perl on windows

2009-05-19 Thread Dermot
2009/5/19 Sharan Basappa : > Actually there was no exe. I only got a zip folder and uncompressed. I > am clueless what to do after that... Click on the file that says 'Win32 Perl Wiki' and follow the instructions at http://win32.perl.org/wiki/index.php?title=Main_Page#Installing_Perl_on_Windows_

Re: Simple regex question

2009-05-19 Thread Chas. Owens
On Tue, May 19, 2009 at 10:21, Alexander Koenig wrote: > Chas. Owens wrote on 05/19/2009 04:02 PM: > >>> ($a,$n,$x,$y)) = $item =~ /(.{5})\.(\d\d?)[-+](\d{1,4})\.(\d{1,4})/; >> snip >> >> As of Perl 5.8 \d no longer matches [0-9].  It now matches any UNICODE >> character that has the digit propert

Re: perl on windows

2009-05-19 Thread Sharan Basappa
Actually there was no exe. I only got a zip folder and uncompressed. I am clueless what to do after that... Regards, On Tue, May 19, 2009 at 1:26 AM, Dr.Ruud wrote: > Sharan Basappa wrote: >> >> Ruud: >>> >>> Sharan: > I would like to know install perl on my windows laptop. Any suggest

Apologies - Hope to clarify things

2009-05-19 Thread AndrewMcHorney
Hello I would like to apologize for creating a lot of confusion. I have most of my perl program working. I ran into an issue and Charles made a suggestion to change my code from a PC based "dir" command to a File:File call to find all the files. I am doing this to make the code more portable

Re: File::Find

2009-05-19 Thread Randal L. Schwartz
> ""Chas" == "Chas Owens" writes: "Chas> Huh, never looked at File::Finder before, it looks like it would only "Chas> make sense if you already knew the UNIX find command. I normally see "Chas> people use File::Find::Rule when they don't want to write their own "Chas> wanted function. Indee

Re: Simple regex question

2009-05-19 Thread Alexander Koenig
Chas. Owens wrote on 05/19/2009 04:02 PM: >> ($a,$n,$x,$y)) = $item =~ /(.{5})\.(\d\d?)[-+](\d{1,4})\.(\d{1,4})/; > snip > > As of Perl 5.8 \d no longer matches [0-9]. It now matches any UNICODE > character that has the digit property. This includes characters such > as "\x{1815}" (MONGOLIAN DI

Re: XML manipulation

2009-05-19 Thread Jenda Krynicky
From: > I have a scenario where I should edit an xml file. I should change an > element's value based on another element's value. > > I should change > > > > >RG0001_Down111 > >Enabled > > > > to > > > > >

RE: Simple regex question

2009-05-19 Thread Dan Fish
> > Simple question for the regEXperts out there... > > > > I have a string that is always in the format:  a.nn+x.y > > > > a is always 5 chars > > n can be 1 or 2 digits > > x can be +/- (with sign), 1-4 digits > > y is always positive (no sign), 1-4 digits > snip > > What do you mean by char

RE: Simple regex question

2009-05-19 Thread Andrew Curry
A crude one ($part,$unit,$x,$y,$xlen,$ylen) = ($1,$2,$3,length($4),length($5)) if ($string =~ /(^\S{5})\.(\d{2})([+-])(\d+)\.(\d+)$/); -Original Message- From: Dan Fish [mailto:d...@ninemoons.com] Sent: 19 May 2009 14:18 To: beginners@perl.org Subject: Simple regex question Simple que

Re: Simple regex question

2009-05-19 Thread Chas. Owens
On Tue, May 19, 2009 at 09:55, Alexander Koenig wrote: snip > ($a,$n,$x,$y)) = $item =~ /(.{5})\.(\d\d?)[-+](\d{1,4})\.(\d{1,4})/; snip As of Perl 5.8 \d no longer matches [0-9]. It now matches any UNICODE character that has the digit property. This includes characters such as "\x{1815}" (MONGO

Re: Simple regex question

2009-05-19 Thread Chas. Owens
On Tue, May 19, 2009 at 09:18, Dan Fish wrote: > Simple question for the regEXperts out there... > > I have a string that is always in the format:  a.nn+x.y > > a is always 5 chars > n can be 1 or 2 digits > x can be +/- (with sign), 1-4 digits > y is always positive (no sign), 1-4 digits snip

Re: Simple regex question

2009-05-19 Thread Alexander Koenig
You wrote on 05/19/2009 03:18 PM: > Simple question for the regEXperts out there... > > I have a string that is always in the format: a.nn+x.y > > a is always 5 chars > n can be 1 or 2 digits > x can be +/- (with sign), 1-4 digits > y is always positive (no sign), 1-4 digits The best I ca

Re: XML manipulation

2009-05-19 Thread Dermot
2009/5/19 : > Hi All, Hi, > I have a scenario where I should edit an xml file. I should change an > element's value based on another element's value. > > I should change > > > >             >               RG0001_Down111 >               >               Enabled > > > > to > > > >          

Simple regex question

2009-05-19 Thread Dan Fish
Simple question for the regEXperts out there... I have a string that is always in the format: a.nn+x.y a is always 5 chars n can be 1 or 2 digits x can be +/- (with sign), 1-4 digits y is always positive (no sign), 1-4 digits Some examples: A123C.11+002.001 FC32G.2-1.0

must_match perl module in opensource

2009-05-19 Thread Rajini Naidu
Hi, I am looking for must_match perl module in opensource. could you please point me to this module. -Rajini

Re: perl on windows

2009-05-19 Thread Eko Budiharto
I usually perl by activestate. It is very simple in installing and upgrading/adding any modules. On Tue, May 19, 2009 at 2:56 AM, Dr.Ruud wrote: > Sharan Basappa wrote: >> >> Ruud: >>> >>> Sharan: > I would like to know install perl on my windows laptop. Any suggestions on which one to

XML manipulation

2009-05-19 Thread ramesh.marimuthu
Hi All, I have a scenario where I should edit an xml file. I should change an element's value based on another element's value. I should change RG0001_Down111 Enabled to RG0001_Down111

Re: perl on windows

2009-05-19 Thread Dr.Ruud
Sharan Basappa wrote: Ruud: Sharan: I would like to know install perl on my windows laptop. Any suggestions on which one to use. Strawberry Perl http://vanillaperl.com/ I downloaded strawberry and extracted it. I dont see any install notes. Any idea how to install (is extraction all we h

application level cluster implementation

2009-05-19 Thread Anirban Adhikary
Hi List Program Scenario: Trying to implement a small( may be fake) level application level cluster implementation. Directory Structure: $home/cluster/box1 $home/cluster/box1 $home/cluster/shared_location >From the box1 and box2: There are presently two sets program in box1 and box2 1)daemon.pl

Re: Finding all files (what I want to do)

2009-05-19 Thread Gunnar Hjalmarsson
AndrewMcHorney wrote: I think we are loosing track of what I want to do. That may be true for my latest message, but only for that I believe. I think you are loosing track of what is reasonable to expect from a list like this. I want to stay out of the dir code approach. I want to find al