That's worked like a charm, You ALL are great.
Thanks everyone for help.
Sara.
- Original Message -
From: <[EMAIL PROTECTED]>
To: "'Sara'" <[EMAIL PROTECTED]>
Sent: Thursday, August 18, 2005 10:50 PM
Subject: RE: Regex Problem.
Hi Sara,
Sara wrote:
> I am at a loss here to generate REGEX for my problem.
>
> I have an input query coming to my cgi script, containg a word (with or
> without spaces e.g. "blood" "Globin Test" etc).
> What I am trying to do is to split this word (maximum of 3 characters) and
> find the BEST possible
On Thursday August 18 2005 11:48 am, Sara wrote:
> I am at a loss here to generate REGEX for my problem.
>
> I have an input query coming to my cgi script, containg a word (with or
> without spaces e.g. "blood" "Globin Test" etc). What I am trying to do is
> to split this word (maximum of 3 charact
Hi,
Here is a code that does what you want and it works if the name has more
than 2 names. I've tried an example with a First name, a last name and a
middle name but it works for more names also.
my $name = "Sarah Mohrley Washington";
my @initials = map /^(\w)/, split /\s+/, $name;
print "@initia
tries
print "Doh!";
exit;
}
-Original Message-
From: Wiggins d'Anconia [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 20, 2003 7:10 PM
To: Sara
Cc: org
Subject: Re: Regex problem
Sara wrote:
> $name = "SARA DEILEY";
>
> how its possible to grasp o
Sara wrote:
$name = "SARA DEILEY";
how its possible to grasp only initials for First and Last name i.e $name ="SD"??
Depends on how standardized your data is, something simple like this
should work for the above:
my $name = 'SARA DEILEY';
my $initials;
if ($name =~ /^(\w)\w*\s+(\w)\w*/) {
Alex,
Did you get the problem fixed? Yes it was because you did not escape your . when
you wanted a .
instead of an any character.
..[a-zA-Z]{2,3} will match ".abc", but it will also match "abcd" but \.[a-zA-Z]{2,3}
will require
that the first character this part of the regular expression
--- Troy May <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm having a problem with a bulletin board I'm setting up. All the smilies
> work except for one, the wink one. which be called when you type in ";)".
> It won't display the graphic. All the others are fine so I know's it not a
> config or d
Hi Troy,
I don't understand your regex. I think the following should work fine:
$message =~ s/(;-\)|;\))//g;
Regards,
--Ahmed
[EMAIL PROTECTED] | http://www.photo.net/users/ahmed
Troy May wrote:
> Hello,
>
> I'm having a problem with a bulletin board I'm setting up. All the smilies
> work