Danny Wong:
Hello,
On Thu, Mar 19, 2015 at 09:25:02PM +, Danny Wong (dannwong) wrote:
> Hi Perl GURU, I have a string like this:
>
> 'Baseline: (_bMgvUBQ_EeKsP6DECdq0Lg) 1 "Initial Baseline"
> "Initial Baseline of Component NGP-Diagnostics" Sivakumar Subas
> Oct 12, 2012 12:35:41 AM';
>
> I
Hi Danny,
On Thu, 19 Mar 2015 21:42:53 +
"Danny Wong (dannwong)" wrote:
> Nevermind. I used regex to accomplish what I wanted instead of the split
> command. Thanks guys!
>
Just a note in general: sometimes when a simple split or a regex match fails
you may opt to employ more complex pars
Nevermind. I used regex to accomplish what I wanted instead of the split
command. Thanks guys!
From: Danny H Wong mailto:dannw...@cisco.com>>
Date: Thursday, March 19, 2015 at 2:25 PM
To: Perl List mailto:beginners@perl.org>>, Perl Beginners
mailto:beginners@perl.org>>
Subjec
Hi Perl GURU,
I have a string like this:
'Baseline: (_bMgvUBQ_EeKsP6DECdq0Lg) 1 "Initial Baseline" "Initial Baseline of
Component NGP-Diagnostics" Sivakumar Subas Oct 12, 2012 12:35:41 AM';
I’m trying to perform a split via \s (spaces) delimiter, but this give me a
partial return of "Initial Ba
Sorry for that John. It works fine.
Many thanks for your help.
Umesh
On 12/16/05, Umesh T G <[EMAIL PROTECTED]> wrote:
>
> Thanks Very much John. :) it worked, but a small problem. if I have
> "\" after the directory name, it does not take as new instanance.
> for ex:
> if my $line is*
Thanks Very much John. :) it worked, but a small problem. if I have "\"
after the directory name, it does not take as new instanance.
for ex:
if my $line is*Options=-a"hello" -mt -ml3 -i"dir1\dir2"-k -p
-i"dir3\dir4\" -m -n -i"\dir5\dir6" -k*
**
then, I'm getting output like this,
dir1\dir
Umesh T G am Donnerstag, 15. Dezember 2005 15.31:
> Hi Joe,
>
> just to correct my prevoius one, my $line does not have * in the begining,
> that was a type. the $line value is like this
>
> *Options=-a"hello" -mt -ml3 -i"dir1\dir2"-k -p -i"dir3\dir4" -m*
>
>
>
> my grep return the values correct
Umesh T G wrote:
Hi Joe,
just to correct my prevoius one, my $line does not have * in the begining,
that was a type. the $line value is like this
*Options=-a"hello" -mt -ml3 -i"dir1\dir2"-k -p -i"dir3\dir4" -m*
my grep return the values correct to my array and the values in array will
be l
Umesh T G wrote:
I tried like this, where $line='*Options=-a"hello" -mt -ml3 -i"dir1\dir2"
-k -p -i"dir3\dir4" -m'*
This line won't compile. Which of the following is it?
$line='Options=-a"hello" -mt -ml3 -i"dir1\dir2" -k -p -i"dir3\dir4" -m';
$line='*Options=-a"hello" -mt -ml3 -i"dir1\dir
Hi Joe,
just to correct my prevoius one, my $line does not have * in the begining,
that was a type. the $line value is like this
*Options=-a"hello" -mt -ml3 -i"dir1\dir2"-k -p -i"dir3\dir4" -m*
my grep return the values correct to my array and the values in array will
be like this obviously:
Umesh T G am Donnerstag, 15. Dezember 2005 14.20:
> Hi John,
Hi Umesh
> I tried like this, where $line='*Options=-a"hello" -mt -ml3 -i"dir1\dir2"
> -k -p -i"dir3\dir4" -m'*
>
>
>
> if (grep/^Options/,$line)
> {
>
> @inc=split(/-i/,$line);
>
> foreach $word (@inc)
> {
> print "$word\n";
> }
>
>
Hi John,
I tried like this, where $line='*Options=-a"hello" -mt -ml3 -i"dir1\dir2"
-k -p -i"dir3\dir4" -m'*
if (grep/^Options/,$line)
{
@inc=split(/-i/,$line);
foreach $word (@inc)
{
print "$word\n";
}
I do not know how to proceed after this.
Thanks for your quick reply...
Thank
Umesh T G am Donnerstag, 15. Dezember 2005 13.00:
> Hi List,
Hi Umesh
> I want to get that value of *-i* set in below line.
>
> *Options=-a"hello" -mt -ml3 -i"dir1\dir2" -k -p -i"dir3\dir4" -m*
>
> What is the best way to get the value of *-i* values into one array. For
> ex: I want the output
Hi List,
I want to get that value of *-i* set in below line.
*Options=-a"hello" -mt -ml3 -i"dir1\dir2" -k -p -i"dir3\dir4" -m*
What is the best way to get the value of *-i* values into one array. For
ex: I want the output as: *dir1\dir2* and *dir3\dir4* into one array.
Thanks in advance.
14 matches
Mail list logo