thanks for the examples
you can use the ast sed (with option -A for the negation tests)
to compare ksh93 vs sed substitution
both use the same underlying ast <regex.h> implementation
the intention is to maintain compatibility between the two where possible
I have a test set up and will get back with details
after the reason for the differences can be located
and either rationalized or fixed
On Sun, 10 Feb 2008 12:24:36 -0500 Finnbarr Murphy wrote:
> All,
> Is the output from the following test script correct?
> #!/usr/bin/ksh93
> echo ${.sh.version}
> var='A regular expressions test'
> echo "1> //e/#"
> echo ${var//e/#}
> echo "2> //[^e]/#"
> echo ${var//[^e]/#}
> echo "3> //+(e)/#"
> echo ${var//+(e)/#}
> echo "4> //-(e)/#"
> echo ${var//-(e)/#}
> echo "5> //?(e)/#"
> echo ${var//?(e)/#}
> echo "6> //*(e)/#"
> echo ${var//*(e)/#}
> echo "7> //!(e)/#"
> echo ${var//!(e)/#}
> The output is:
> Version M 1993-12-28 s+
> 1> //e/#
> A r#gular #xpr#ssions t#st
> 2> //[^e]/#
> ###e######e###e########e##
> 3> //+(e)/#
> A r#gular #xpr#ssions t#st
> 4> //-(e)/#
> A regular expressions test
> 5> //?(e)/#
> ###########################
> 6> //*(e)/#
> ###########################
> 7> //!(e)/#
> #
> Note the extra "#" in test 5 and 6 while test 7 only outputs a single "#"
> Is there a simple explanation?
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users