Öznur tastan wrote: > > Hi all Hello,
> 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). The . character in a regular expression will match any character except newline but the . character in a character class will only match the . character so that matches anything that is not a period or a newline. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>