From: Rick Bradley Date: 2002-06-08T13:03:56+09:00 Subject: Re: words[0] ! =~ /#*/ doesn't match "#aaaaaaaaa" * Peter Booth (pbooth@nocoincidences.com) [020607 23:00]: > I am attempting to parse the following file and ignore lines that > begin with a # but my regexp doesn't seem to match correctly. Can > anyone tell me the "right" way to match a string that begins with a # > character? /#*/ will match any string (the '*' makes '#' optional) /#/ (or /#+/) will match strings containing a '#' /^#/ (or /^#+/) will match strings starting with a '#' Rick -- http://www.rickbradley.com MUPRN: 579 (79F/83F) | recently as well. random email haiku | this makes things interesting but | not overly so.