a g writes: > > This may be a usage problem, but it does not exist with other regex packages > (such as slre) and I can't find anything in the documentation to indicate > that the syntax should be different for coreutils. I am using coreutils 8.4 > on ubuntu AMD64, version 9.10. I cannot get the coreutils regex matcher to > do lazy matching. Here is my code:
By "lazy" do you mean non-greedy? > Here is the problem. If you execute: > regex_test "a[^x]*?a" "a1a2a" The non-greedy quantifiers like *? are not part of standard regex, they are extensions found in perl, and in other packages inspired by perl. -- Alan Curry