Hi K.Moeng -
At 2005-10-18, 20:00:28 you wrote:
>Hello again,
>
>I have rephrased my question from yesterday,
>
>I want to be able to ignore the white space in between ROAM and ACT
>that is return the query as ROAM ACT without falling to the else statement.
>
>$msg = $ARGV[0];
>
>$msg =~ s/\"/' /ig;
the /i doesn't do anything here; " does not have to be escaped:
$msg =~ s/"/'/g;
>
>$found = 0;
>
>if ($msg =~ /roam act/i)
Whitespace is \s ( by default ( |\t|\n) )
Zero or more whitespaces is \s*
One or more whitespaces is \s+
so:
if ($msg =~ /roam\s+act/i)
>{
> $name = 'ACTivated';
> $found = 1;
>}
>
>elsif ($msg =~ /roam dact/i)
and:
elsif ($msg =~ /roam\s+dact/i)
>
>{
> $name = 'DeACTivated';
> $found = 1;
> }
>
> if ($found == 1)
>
>print ".Thank you..........................\n";
>}
>
>else
>{
> print "Sorry. Your request has not been sent for Roaming.\n";
>}
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.0.344 / Virus Database: 267.12.4/142 - Release Date: 10/18/2005
Aloha => Beau;
[EMAIL PROTECTED]
2005-10-18
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>