Re: Regex against a scalar

2005-04-11 Thread M. Kristall
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

RE: Regex against a scalar

2005-03-28 Thread Marcos Rebelo
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 like to search

Re: Regex against a scalar

2005-03-28 Thread Steven Schubiger
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

Regex against a scalar

2005-03-23 Thread Perl
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

Re: Regex against a scalar

2005-03-23 Thread Offer Kaye
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