I'm trying to implement the following code in ANSI C: ksh -c 's="val1=hello val2=foobar" ; nop="${s//~(E)(val1=[[:alnum:]]+)|(val2=[[:alnum:]]+)/NOP}" ; printf "val1 is ${.sh.match[1][*]}, val2 is ${.sh.match[2][*]}'
I've tried to get strgrpmatch() working but the only thing I got were core dumps. Does anyone have a good, simple example for strgrpmatch()? Please just a simple example with main(), string in, matches out; the ones I found in ast-open are all very complex and thus very hard to grok. _______________________________________________ ast-developers mailing list ast-developers@research.att.com https://mailman.research.att.com/mailman/listinfo/ast-developers