--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> Stuart White wrote:
> I don't think so:
>
...
> The only place a colon split splits is where you
> have a colon.
>
That was MY typo. Oops. In the book there is a colon
after merlyn, not a question mark. Irrespective of
that, I was still
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> Stuart White wrote:
>
>
> > the file format is not sloppy at all. I was just
> > confused as to why I couldn't use split on the
> first
> > space score comma and space, and then the next
> space
> > score. <-Perhaps I just answered my questio
Stuart White wrote:
> the file format is not sloppy at all. I was just
> confused as to why I couldn't use split on the first
> space score comma and space, and then the next space
> score. <-Perhaps I just answered my question right
> there, seeing that in the second iteration, there is
> no c
Stuart White wrote:
> $line =
> "merlyn::118:10:Randal:/home/merlyn?/usr/bin/perl";
> @fields = s;oit(/:/,$line);
> #now @fields is ("merlyn:,
> "","118","10","Randal","/home/merlyn","/usr/bin/perl")
I don't think so:
Greetings! E:\d_drive\perlStuff>perl -w
$line =
"merlyn::118:10:Randal:/ho
--- Paul Johnson <[EMAIL PROTECTED]> wrote:
>
> Stuart White said:
>
> > I'm not sure what's going wrong here. Can someone
> > tell me how I can split 'Spurs 94, Suns 82' into:
> > array[0] == 'Spurs' and array[1] == 'Suns'
>
> @array = /([[:alpha:]]+)/g;
>
This did what I wanted it to do, t
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> Stuart White wrote:
>
> > Wow, yeah that helps a lot.
> > Here's a question: If if had:
> > $line = 'Spurs 94, Suns 82, Heat 99, Magic 74'
> > and then did a split on comma and comma's
> surrounding
> > spaces:
> > @result = split (/\s*,\s*/, $
Stuart White wrote:
> Wow, yeah that helps a lot.
> Here's a question: If if had:
> $line = 'Spurs 94, Suns 82, Heat 99, Magic 74'
> and then did a split on comma and comma's surrounding
> spaces:
> @result = split (/\s*,\s*/, $line);
result? How specific is "result" to the issue at hand? Woul
--- "Randy W. Sims" <[EMAIL PROTECTED]>
wrote:
> On 03/12/04 08:18, Stuart White wrote:
> > I like the idea of using split() but decided to
> keep
> > most of my regex and incorporate split on the
> string.
> > So the string: 'Spurs 94, Suns 82' <-and there may
> or
> > may not be a space after th
On 03/12/04 08:18, Stuart White wrote:
I like the idea of using split() but decided to keep
most of my regex and incorporate split on the string.
So the string: 'Spurs 94, Suns 82' <-and there may or
may not be a space after the 2.
I decided to read up on split(), and then try to split
it.
The spli
Stuart White said:
> I'm not sure what's going wrong here. Can someone
> tell me how I can split 'Spurs 94, Suns 82' into:
> array[0] == 'Spurs' and array[1] == 'Suns'
@array = /([[:alpha:]]+)/g;
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROT
I like the idea of using split() but decided to keep
most of my regex and incorporate split on the string.
So the string: 'Spurs 94, Suns 82' <-and there may or
may not be a space after the 2.
I decided to read up on split(), and then try to split
it.
This is what I came up with:
@teamscores = spl
Oops, it just looked like you were testing a literal.
My mistake, I'll check it out.
--- "Randy W. Sims" <[EMAIL PROTECTED]>
wrote:
> On 3/11/2004 10:28 PM, Stuart White wrote:
>
> > --- "Randy W. Sims" <[EMAIL PROTECTED]>
> > wrote:
> >
> >>On 3/11/2004 9:01 PM, Stuart White wrote:
> >>
> >>
On 3/11/2004 10:28 PM, Stuart White wrote:
--- "Randy W. Sims" <[EMAIL PROTECTED]>
wrote:
On 3/11/2004 9:01 PM, Stuart White wrote:
I'm confused about greediness.
This is the line that I'm trying to match:
Spurs 94, Suns 82
If the line is as above, I probably wouldn't use a
regex. The following
--- "Randy W. Sims" <[EMAIL PROTECTED]>
wrote:
> On 3/11/2004 9:01 PM, Stuart White wrote:
>
> > I'm confused about greediness.
> > This is the line that I'm trying to match:
> >
> > Spurs 94, Suns 82
>
> If the line is as above, I probably wouldn't use a
> regex. The following
> is more verbo
On 3/11/2004 9:01 PM, Stuart White wrote:
I'm confused about greediness.
This is the line that I'm trying to match:
Spurs 94, Suns 82
If the line is as above, I probably wouldn't use a regex. The following
is more verbose, but easier to manage IMHO.
#!/usr/bin/perl
use strict;
use warnings;
my
I'm confused about greediness.
This is the line that I'm trying to match:
Spurs 94, Suns 82
This is my regex:
if ($_
=~/(Spurs|Suns|Mavericks|Lakers|Clippers|Cavaliers|Celtics|Pacers|Pistons|Wizards|Warriors|Bulls|Hawks|Raptors|Magic|Heat|Kings|Rockets|Nuggets|Grizzlies|Jazz|Knicks|Nets|Supersoni
16 matches
Mail list logo