Reposted as new thread: [Note: I am reposting this as a new message, in order to start a new thread. Please remember to use the new message command, rather than a reply, when starting a new subject. For many of us with threaded browsers, your message got lost way out on an unrelated thread.--Joseph]
Hi all Just for fun (really no context) i was wondering how to create regular expressions that will never match any string. /^[^\w\W]/ is one of them am I right? No string can start with a character that is neither alphanumeric nor nonalhanumeric. But why does /^[^.\n]/ matches . doesn't that mean the string should begin a character that is not any character or not a newline(nothing else should be left). Could someone enligthen me? Below is to code I use to check. thanks oznur use strict; use warnings; my $string="does it match"; if ($string=~/(^[^\w\W])/){ print "matches $1\n"; } else { print "doesn't match \n"; } if ($string=~/(^[^.\n])/){ print "matches $1\n"; } else { print "doesn't match \n"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>