From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 10 12:14:37 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C712E106566B for ; Wed, 10 Feb 2010 12:14:37 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 7FB058FC15 for ; Wed, 10 Feb 2010 12:14:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 6B29D9CB080; Wed, 10 Feb 2010 13:14:03 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hLlAkX5At+0B; Wed, 10 Feb 2010 13:14:01 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 2875F9CB0D3; Wed, 10 Feb 2010 13:14:01 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o1ACE1o4081530; Wed, 10 Feb 2010 13:14:01 +0100 (CET) (envelope-from rdivacky) Date: Wed, 10 Feb 2010 13:14:01 +0100 From: Roman Divacky To: Dag-Erling Sm??rgrav Message-ID: <20100210121401.GA81144@freebsd.org> References: <86tytqvwky.fsf@ds4.des.no> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86fx59jpti.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i Cc: Andrew Brampton , Garrett Cooper , freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 12:14:37 -0000 On Wed, Feb 10, 2010 at 12:24:57PM +0100, Dag-Erling Sm??rgrav wrote: > Garrett Cooper writes: > > C-shell globs as some programming languages referring to it as, > > i.e. perl (which this is a subset of the globs concept) allow for > > expansion via `*' to be `anything'. Regexp style globs for what you're > > looking for would be either .* (greedy) or .+ (non-greedy), with it > > being most likely the latter case. > > Uh, not quite. > > Formally, a regular expression is a textual representation of a finite > state machine that describes a context-free grammar. I dont think so.... regular expressions describe regular languages which are a strict subset of context free languages. the practical difference is that you cannot describe for example expressions with parenthesis with a regular expression while you can with a context free grammar... for more info see: http://en.wikipedia.org/wiki/Chomsky_hierarchy