bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5970: regex won't do lazy matching


From: Alan Curry
Subject: bug#5970: regex won't do lazy matching
Date: Mon, 19 Apr 2010 16:56:33 -0500 (GMT+5)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]