On 5/1/07, Somu <[EMAIL PROTECTED]> wrote:
my $input = 'loqr';
if ( $input =~ m!lor!i ) {print 'match'}
how will that match? i want them to match. Thats what i want to do.
You can add the 'q' to the pattern. Is this what you want?
if ( $input =~ /loqr/i ) { print 'match' }
Or you can remove the 'q' from the input. Is this what you want?
$input =~ s/q//g;
Or do you mean that you want to match any string that has 'l', then
'o', then 'r', even if other characters may intervene?
if ( $input =~ /l.*o.*r/is ) { print 'match' }
Can you be more specific about what you want?
Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/