Re: Tokenizing a string

2008-02-12 Thread David Moreno
On Feb 12, 2008 4:01 AM, Dr.Ruud <[EMAIL PROTECTED]> wrote: > "David Moreno" schreef: > > > rvtol+news: > > Stop top-posting. Stop inline posting :p > The question was about a string that looks very much like a path and > filename. > If it is about a path and filename, then there can be platfo

RE: Tokenizing a string

2008-02-12 Thread Allam Reddy, Thomas
Thanks Thomas for your help. It met my requirement -Original Message- From: Thomas Bätzler [mailto:[EMAIL PROTECTED] Sent: Monday, February 11, 2008 7:01 PM To: beginners@perl.org Cc: Allam Reddy, Thomas Subject: RE: Tokenizing a string Allam Reddy, Thomas <[EMAIL PROTECTED]>

Re: Tokenizing a string

2008-02-12 Thread Dr.Ruud
"David Moreno" schreef: > rvtol+news: Stop top-posting. >> Or not code a regex at all, and use a module like >> File::Basename or File::Spec. > > But where's the fun then? :) The question was about a string that looks very much like a path and filename. If it is about a path and filename, then

Re: Tokenizing a string

2008-02-11 Thread David Moreno
But where's the fun then? :) On Feb 11, 2008 4:09 PM, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Or not code a regex at all, and use a module like File::Basename or > File::Spec. -- David Moreno - http://www.damog.net/ Yes, you can.

Re: Tokenizing a string

2008-02-11 Thread Dr.Ruud
"Martin Barth" schreef: > Allam Reddy, Thomas: >> I have a string "jdbc/abc.xml" which I wanted to tokenize using the >> delimiter "/" >> May I know the perl code for this? > > you could use split in this situation. > > @tokens = split(/\//, $string); > the frist parameter to split is a regular ex

RE: Tokenizing a string

2008-02-11 Thread Thomas Bätzler
Allam Reddy, Thomas <[EMAIL PROTECTED]> asked: > I have a string "jdbc/abc.xml" which I wanted to tokenize > using the delimiter "/" > May I know the perl code for this? my $string = 'jdbc/abc.xml'; my @tokens = split /\//, $string; print 'Tokens: ' , join( ',', @tokens ), "\n"; HTH, Thomas --

Re: Tokenizing a string

2008-02-11 Thread Martin Barth
On 12:33:09 11/02/2008 "Allam Reddy, Thomas" <[EMAIL PROTECTED]> wrote: > > Hi All, > > I have a string "jdbc/abc.xml" which I wanted to tokenize using the > delimiter "/" > May I know the perl code for this? > > Thanks > Thomas Reddy hi, you could use split in this situation. @tokens = split(/\

Tokenizing a string

2008-02-11 Thread Allam Reddy, Thomas
Hi All, I have a string "jdbc/abc.xml" which I wanted to tokenize using the delimiter "/" May I know the perl code for this? Thanks Thomas Reddy