Hi,
I am a novice to perl programming. When I execute the following code, I get
always "No Match". I guess my reg-exp is correct. I also tried changing $line= "INVITE
sip:[EMAIL PROTECTED] SIP/2.0"; to have double quotes and a backslash char before @
symbol. Even then it gives me No Match.
It looks like there is no '\r\n' at the end of $line.
-Original Message-
From: Balaji Thoguluva [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Reg. string matching using reg-exp
#!/usr/bin/perl -w
my $line= 'IN
For Quality purpouses, Balaji Thoguluva 's mail on Friday 06 February 2004
20:44 may have been monitored or recorded as:
> Hi,
> I am a novice to perl programming. When I execute the following code,
> I get always "No Match". I guess my reg-exp is correct. I also tried
> changing $line= "INVI
obably will.
_
From: Balaji Thoguluva [mailto:[EMAIL PROTECTED]
Sent: Friday, February 06, 2004 12:07 PM
To: Tim Johnson
Subject: RE: Reg. string matching using reg-exp
Thanks Tim Johnson. I removed the /r/n from the reg-ex and it works. I
have another question. How to assign a mul
On Feb 6, Balaji Thoguluva said:
>Thanks Tim Johnson. I removed the /r/n from the reg-ex and it works. I
>have another question. How to assign a multiline string or string having
>many lines(strings having \n) to a $string-variable?. In C, there is a
>"\" operator.
You don't need to do anything s
Balaji thoguluva wrote:
> I am a novice to perl programming. When I execute the following code, I get
> always "No Match". I guess my reg-exp is correct.
I also tried changing $line= "INVITE sip:[EMAIL PROTECTED] SIP/2.0"; to have double
quotes and a backslash char before @ symbol.
Even the
Jeff 'Japhy' Pinyan wrote:
>
> On Feb 6, Balaji Thoguluva said:
>
> >Thanks Tim Johnson. I removed the /r/n from the reg-ex and it works. I
> >have another question. How to assign a multiline string or string having
> >many lines(strings having \n) to a $string-variable?. In C, there is a
> >"\" op
Rob Dixon wrote:
> In C, newlines have to be introduced explicitly as "\n". A literal
> newline character (the end of a source record) has to be escaped to
> make it 'vanish', otherwise it should throw a compilation error.
>
> In Perl:
>
> my $string = "One
> Two
> Three
> ";
>
> In C:
>
>