sysctl with regex?
Roman Divacky
rdivacky at freebsd.org
Wed Feb 10 12:14:37 UTC 2010
On Wed, Feb 10, 2010 at 12:24:57PM +0100, Dag-Erling Sm??rgrav wrote:
> Garrett Cooper <yanefbsd at 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
More information about the freebsd-hackers
mailing list