Date: Wed, 10 Feb 2010 13:14:01 +0100 From: Roman Divacky <rdivacky@freebsd.org> To: Dag-Erling Sm??rgrav <des@des.no> Cc: Andrew Brampton <brampton+freebsd@gmail.com>, Garrett Cooper <yanefbsd@gmail.com>, freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? Message-ID: <20100210121401.GA81144@freebsd.org> In-Reply-To: <86fx59jpti.fsf@ds4.des.no> References: <d41814901002091308s7e894b55p880bde165bbbe703@mail.gmail.com> <86tytqvwky.fsf@ds4.des.no> <d41814901002091528i4884987cmb7347dfe4d50bdc5@mail.gmail.com> <26049703-8844-4476-B277-776A4EFC0A53@gmail.com> <86fx59jpti.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 10, 2010 at 12:24:57PM +0100, Dag-Erling Sm??rgrav wrote: > Garrett Cooper <yanefbsd@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100210121401.GA81144>