Re: Regex to remove zeros after . in file name

2007-11-12 Thread Ashok Varma
s/\.0+(\d+)/\.\1/; The above substitution works. Ashok On 11/13/07, danlamb <[EMAIL PROTECTED]> wrote: > > Hey guys, > > I need a regex to remove zeros after the . in a file name if they are > followed by another digit. > > Example: XX.001 becomes XX.1 > > Any ideas? I've been banging

Re: Beginner Reg.Expression Question

2007-10-10 Thread Ashok Varma
Or You can also do ... $string =~ s/(\d+)$/$1+1/e; Ashok On 10/10/07, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Tatiana Lloret Iglesias wrote: > > > > Hi all! > > > > What regular expression do I need to convert Version: 1.2.3 to > Version: > > 1.2.4 ? > > > > I.e. my pattern is Version: num

Re: Validating XML against XSD

2007-02-05 Thread Ashok Varma
Any clue from anyone ?. Am still struggling with the problem. Ashok On 2/1/07, Ashok Varma <[EMAIL PROTECTED]> wrote: Hi, I have XSD, XML files and want to validate the XML against the XSD and then only proceed with parsing the XML file. I used XML::SAX::ParserFactory, XML::Val

Validating XML against XSD

2007-01-31 Thread Ashok Varma
Hi, I have XSD, XML files and want to validate the XML against the XSD and then only proceed with parsing the XML file. I used XML::SAX::ParserFactory, XML::Validator::Schema modules but following is the issues i faced ... 1. Failed with this reason --- elementFormDefault in must be 'unqualifie

Re: looping through complicated hashes..

2006-09-07 Thread Ashok Varma
Hi Michael, Following is one way ... Here is am assuming that you have dumped that data into a array named '@your_array' which contains each line in array references(array of arrays). $table = new HTML::T

Re: Need Help

2006-09-06 Thread Ashok Varma
Hi Kishore, The below snippet will get your desired result. --- #!/usr/bin/perl use strict ; my @structure_name = (); my $fni = 'd:\Sample.txt' ; my $fno = 'd:\ashok.txt'

Re: Need Help

2006-09-03 Thread Ashok Varma
If you can provide me a sample file maybe i can help more. i am guessing your file and writing a sample below. - open(FH, "/your/file/path"); my @file = ; close FH; open(FH, ">/your/new/file"); foreach my $line (@file)