Regex against a scalar
From: Perl (Perl_at_nyclimits.org)
Date: 03/24/05
- Next message: Andrew Gaffney: "regex for l33t speak"
- Previous message: DBSMITH_at_OhioHealth.com: "Re: printing a filehandle to another file."
- Next in thread: Offer Kaye: "Re: Regex against a scalar"
- Reply: Offer Kaye: "Re: Regex against a scalar"
- Reply: Marcos Rebelo: "RE: Regex against a scalar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 23 Mar 2005 17:41:31 -0800 To: "Beginner Perl" <beginners@perl.org>
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 this possible somehow?
- Next message: Andrew Gaffney: "regex for l33t speak"
- Previous message: DBSMITH_at_OhioHealth.com: "Re: printing a filehandle to another file."
- Next in thread: Offer Kaye: "Re: Regex against a scalar"
- Reply: Offer Kaye: "Re: Regex against a scalar"
- Reply: Marcos Rebelo: "RE: Regex against a scalar"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|