perl.scripts...Re: Using regular expressions to insert tags by Geoffrey Leach- June 21, 2006 To assist you in finguring this out, you might try recoding usings x - and lay out your regex over several lines so as to better see what&39;s going on. Also, if your data is consistent, (d+)s+ would be lots faster.On 06.20 07:19, Sriram Rajagopalan wrote:> Hello,> > I have a text file in a columnar format. There are seven entries in a> row,> separated by tabs.> > eg.> > 1 23 555 34 Corporation Index Sediment> > This has to be tagged as:>...http://www.nntp.perl.org/group/perl.scripts/2006/06/msg433.html Re: Using regular expressions to insert tags by Terrence Brannon- June 21, 2006 Why not stick it in a hash and then use XML::GeneratorOn 62006, Sriram Rajagopalan <sriram.rajagopalanggsinc.com> wrote:>> Hello,>> I have a text file in a columnar format. There are seven entries in a row,> separated by tabs.>> eg.>> 1 23 555 34 Corporation Index Sediment>> This has to be tagged as:>>>...http://www.nntp.perl.org/group/perl.scripts/2006/06/msg432.html Re: Using regular expressions to insert tags by Johan Vromans- June 21, 2006 Sriram Rajagopalan <sriram.rajagopalanggsinc.com> writes:> 1 23 555 34 Corporation Index Sediment>> This has to be tagged as:> <no>1<no><code>23<code><set>555<set><id>34<id><status>Corporation<statu> s><value>Index<value><type>Sediment<type> !usrbinperl use strict; use warnings; These are the desired tags. my tags = qw(no code set id status value type); The input. my $line =...http://www.nntp.perl.org/group/perl.scripts/2006/06/msg431.html Re: Using regular expressions to insert tags by Brad Baxter- June 21, 2006 On 62006, Sriram Rajagopalan <sriram.rajagopalanggsinc.com> wrote:>> Hello,>> I have a text file in a columnar format. There are seven entries in a row,> separated by tabs.>> eg.>> 1 23 555 34 Corporation Index Sediment>> This has to be tagged as:>>>...http://www.nntp.perl.org/group/perl.scripts/2006/06/msg430.html Using regular expressions to insert tags by Sriram Rajagopalan- June 20, 2006 Hello,I have a text file in a columnar format. There are seven entries in a row,separated by tabs.eg.1 23 555 34 Corporation Index SedimentThis has to be tagged as:<no>1<no><code>23<code><set>555<set><id>34<id><status>Corporation<status><value>Index<value><type>Sediment<type>I have stored the file contents to $_ and I am using the...http://www.nntp.perl.org/group/perl.scripts/2006/06/msg429.html |