Offer Kaye wrote:
On Wed, 23 Mar 2005 17:41:31 -0800, Perl wrote:
Hi.
I would like to search a scalar variable and have the output to another
scalar. For example:
$test = "This is some test data";
I want another scalar, $regex to hold the output of a regular expression
lookup against $test.
So some
On 28 Mar, Marcos Rebelo wrote:
> I want another scalar, $regex to hold the output of a regular
> expression lookup against $test.
my ($match) = $regexp =~ /.*\s+(so.*?)\s+.*/;
$match holds "some".
Steven
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
I'm lost with this question, but try to run:
print("abcd" =~ /(b.)/)
Is this what you need?
Marcos
-Original Message-
From: Perl [mailto:[EMAIL PROTECTED]
Sent: quinta-feira, 24 de Março de 2005 1:42
To: Beginner Perl
Subject: Regex against a scalar
Hi.
I would l
On Wed, 23 Mar 2005 17:41:31 -0800, Perl wrote:
> Hi.
>
> I would like to search a scalar variable and have the output to another
> scalar. For example:
>
> $test = "This is some test data";
>
> I want another scalar, $regex to hold the output of a regular expression
> lookup against $test.
>
>
Hi.
I would like to search a scalar variable and have the output to another
scalar. For example:
$test = "This is some test data";
I want another scalar, $regex to hold the output of a regular expression
lookup against $test.
So something like this:
$regex =~ /test/ running against $test. Is