[EMAIL PROTECTED]
.co.uk> cc:
Subject: Re: Searching for the
cc: [EMAIL PROTECTED]
03/24/03 11:06 AM Subject: Re: Searching for the right
regular expressions(Document link:
Scott E Robinson wrote:
> Hi, Rob! Amazing how quickly you coded those up!
>
> 1.a. works great.
>
> 1.b. doesn't quite work yet. The revised version (my @wanted =
> $string =~ /\b\w\d*\b/ig;) seems to let everything pass through it.
Sorry, I would say I'm having a bad day, but I'm not - I have
uk> cc:
Subject: Re: Searching for the
[EMAIL PROTECTED] wrote:
>
> Dear Perl experts,
>
> I'm trying to find the right regular expressions to do some simple (?)
> string processing. Can anyone tell me how to do these?
#!/usr/bin/perl -lw
use strict;
> 1. Given a string consisting of substrings delimited by colons, such as
> :B520:
Hi. Rading your post again, it looks like I kinda screwed up.
Lets try again!
Rob Dixon wrote:
> Hi Scott
>
> Scott E Robinson wrote:
> > Dear Perl experts,
> >
> > I'm trying to find the right regular expressions to do some simple
> > (?) string processing. Can anyone tell me how to do these?
>
Hi Scott
Scott E Robinson wrote:
> Dear Perl experts,
>
> I'm trying to find the right regular expressions to do some simple (?)
> string processing. Can anyone tell me how to do these?
>
> 1. Given a string consisting of substrings delimited by colons, such
> as :B520:L201:M:M260:8:G607:,
2.if you mean the numbers of blocks between ":" then
my @temp = split (":", $Line);
print "Amount of blocks - ".scalar (@Temp), "\n";
1.a.
foreach (@Temp) {
if (length ($Temp[$_] == 1) {
$Temp[$_] = "";
}
}
1.b. "unless" instead of "if"
1.c. a mix of 1.a & 1.b
3. Use 2 and compare blocks.