Don't know if this works, but have you tried:

$string = "1\\.2\\.3";

----- Original Message ----- 
From: "Wong, Danny H." <[EMAIL PROTECTED]>
To: "Sisyphus" <[EMAIL PROTECTED]>; "Jan Dubois"
<[EMAIL PROTECTED]>; "perl-win32-users"
<perl-win32-users@listserv.ActiveState.com>
Sent: Thursday, September 15, 2005 2:28 PM
Subject: Regular expression


> Hi Perl Gurus,
> I have a regular expression question.
> I have a variable
> $Number = "1.2.3.4"
>
> When I use the variable $Number as part of my regular expression, the
> "." character gets interpret as any character. How do I make it a
> literal "." that I'm searching for?
> Example:
> $String = "This is a numeric string 1.2.3.411 embedded within another
> string 3.4.5.6"
> $String =~ m/$Number/I; This returns "1.2.3.411" true, when it
> shouldn't.
>
> Thanks for your help!
>
> Thanks
> Danny Wong
> SCM Engineer
> PowerTV Inc.,
>
>
> - - - - - - - Appended by PowerTV, A division of Scientific
Atlanta. - - - - - - -
> This e-mail and any attachments may contain information that is
confidential, proprietary, privileged or otherwise protected by law. The
information is solely intended for the named addressee (or a person
responsible for delivering it to the addressee). If you are not the intended
recipient of this message, you are not authorized to read, print, retain,
copy or disseminate this message or any part of it. If you have received
this e-mail in error, please notify the sender immediately by return e-mail
and delete it from your computer.
>
> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to