From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: 26 August 2005 13:53
To: [email protected]
Subject: Metacharacters
Morning,
I am working on some code which will check for a line starting
with any Perl Metacharacters, and precede it with a '/'.
Here is what i have thus far:
if ($LogLinePrefix =~
/[\^\$\+\*\?\.\|\(\)\{\}\\\[\]]/)
{
$LoglinePrefix =~
s/[\^\$\+\*\?\.\|\(\)\{\}\\\[\]]*/\\{$1}/g ;
}
Unfortunately, this isn't working. Can anyone make a
suggestion?
See 'perldoc -f quotemeta'
HTH
--
Brian Raven
-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary
companies.
-----------------------------------------------------------------------
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs