deane.rothenma...@walgreens.com wrote:
>
> Cheap and dirty, cheezy, kindergarteny, but it does what you want:
>
> use strict;
> use warnings;
>
> my $phnum = '847-VICTORY';
>
> print "before: \"$phnum\"\n";
>
> $phnum =~ s/[ABC]/2/ig;
> $phnum =~ s/[DEF]/3/ig;
> $phnum =~ s/[GHI]/4/ig;
> $phnu
Cheap and dirty, cheezy, kindergarteny, but it does what you want:
use strict;
use warnings;
my $phnum = '847-VICTORY';
print "before: \"$phnum\"\n";
$phnum =~ s/[ABC]/2/ig;
$phnum =~ s/[DEF]/3/ig;
$phnum =~ s/[GHI]/4/ig;
$phnum =~ s/[JKL]/5/ig;
$phnum =~ s/[MNO]/6/ig;
$phnum =~ s/[PQRS]/7/ig;
sanya
From:
"Stanislaw Romanski"
To:
"Barry Brevik" ,
Date:
08/13/2009 12:20 PM
Subject:
Re: Help with regex
Sent by:
activeperl-boun...@listserv.activestate.com
Hello,
Maybe you need something like
$text =~ tr/ABCD/2223/;
?
Stanislaw Romanski
- Original Mess
Hello,
Maybe you need something like
$text =~ tr/ABCD/2223/;
?
Stanislaw Romanski
- Original Message -
From: "Barry Brevik"
To:
Sent: Thursday, August 13, 2009 6:52 PM
Subject: Help with regex
>I am using Active Perl 5.8.8. and Perl Dev Kit 7.0.
>
> I&
I am using Active Perl 5.8.8. and Perl Dev Kit 7.0.
I'm writing some code that standardizes the format of phone numbers in a
database because users have entered them in every way imaginable.
Anyway, some of the phone numbers look like this:
800-69-VORTEX
...where the user has entered alpha
sekhar kavuru wrote:
Hi All
I need a REGEX to get a string between two characters from a static
string
e.g. /install/sql/foo.c@@/main/integration/1
I need to get foo.c , i.e string between / and @@
my $string = '/install/sql/foo.c@@/main/integration/1';
$string =~ s#^.+?(.*?/([^/]+?))[EMAI
**
Sam Dela Cruz
sekhar kavuru <[EMAIL PROTECTED]>
Sent by:
[EMAIL PROTECTED]
10/28/2005 08:51 AM
To
activeperl@listserv.ActiveState.com
cc
Subject
Need help with regex
Classification
Hi All
I need a REGEX to get a string between two characters from
a stat
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sekhar
kavuru
Sent: 28 October 2005 16:51
To: activeperl@listserv.ActiveState.com
Subject: Need help with regex
> Hi All
>
>
> I need a REGEX to get a string between two characters from a static
string
>
>
&
ubject
Need help with regex
Hi All
I need a REGEX to get a string between two characters from
a static string
e.g. /install/sql/foo.c@@/main/integration/1
I need to get foo.c , i.e string between / and @@
First it needs find where @@ occurs in the string and trace
back to fil
use strict;
my $text = '/install/sql/foo.c@@/main/integration/1';
my ($value) = $text =~ /\/([^\/]+?)@/;
e.g. /install/sql/foo.c@@/main/integration/1
___
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.Active
Hi All
I need a REGEX to get a string between two characters from a static string
e.g. /install/sql/foo.c@@/main/integration/1
I need to get foo.c , i.e string between / and @@
First it needs find where @@ occurs in the string and trace back to file name until it encounters / character
11 matches
Mail list logo