there is inconsistency between the grep RE letter assignments,
ksh ~(...) parsing, and libast regcomp() ~(...) parsing
(ksh must dig into ~(...) to change ()&| lexing on the fly)
for now use A (augmented) instead of X for extended+conjunction+negation
I'll post a beta next week with these assignments
A|X xgrep extended+conjunction+negation
B|G grep basic
E egrep extended
F|L fgrep literal
K ksh grouping+alternation+conjunction+negation
P pgrep pcre compatibility -- close but not complete (may never
be)
S sh basic shell patterns
via changes to
src/lib/libast/regex/regcomp.c
src/cmd/ksh93/sh/macro.c
On Sun, 28 Mar 2010 09:50:49 +0200 =?KOI8-R?B?z8zYx8Egy9LZ1sHOz9fTy8HR?= wrote:
> OK, I am getting crazy (maybe): Can anyone explain why ksh -c 'x="-a
> -C" ; [[ "$x" == ~(Xlr)(.*-a.*)&(.*-C.*) ]] && print true' does not
> print 'true"? Xlr selects an augmented extended regular expression,
> .*-a.* should be a match, .*-C.* should be a match and & means AND.
> I'm banging my head since an hour against the problem with no success.
> HELP, please.
> Olga
> --
> , _ _ ,
> { \/`o;====- Olga Kryzhanovska -====;o`\/ }
> .----'-/`-/ [email protected] \-`\-'----.
> `'-..-| / Solaris/BSD//C/C++ programmer \ |-..-'`
> /\/\ /\/\
> `--` `--`
> _______________________________________________
> ast-users mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-users
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users