You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Radovan Petrík <br...@lee.sk> on 2003/08/06 09:34:17 UTC

Problem with RE

Hi , I have problem with this code.

[- $tmp =~ /(*)/ -]

What is wrong ?

Thanks,  Rado.  



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Problem with RE

Posted by Jochen Topf <jo...@remote.org>.
On Wed, Aug 06, 2003 at 09:34:17AM +0200, Radovan Petrík wrote:
> Hi , I have problem with this code.
> 
> [- $tmp =~ /(*)/ -]
> 
> What is wrong ?

Regexes are not shell globs. Try this:

[- $tmp =~ /(.*)/ -]

Jochen
-- 
Jochen Topf  jochen@remote.org  http://www.remote.org/jochen/  +49-721-388298


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


RE: Problem with RE

Posted by Harald Becker <ha...@webscope.de>.
[- $tmp =~ /(.*)/ -]

Or 

[- $tmp =~ /(\*)/ -]

Or

[- $tmp =~ /\(*\)/ -]

Depending on what you want to do :)

Harald


> -----Original Message-----
> From: Radovan Petrík [mailto:bruce@lee.sk] 
> Sent: Wednesday, August 06, 2003 9:34 AM
> To: Embperl
> Subject: Problem with RE
> 
> 
> Hi , I have problem with this code.
> 
> [- $tmp =~ /(*)/ -]
> 
> What is wrong ?
> 
> Thanks,  Rado.  
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org