Project

General

Profile

Actions

Bug #516

closed

libc regex misses \< and \> word delimiters

Added by Garrett D'Amore over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
High
Category:
lib - userland libraries
Start date:
2010-12-13
Due date:
% Done:

100%

Estimated time:
Difficulty:
Tags:
Gerrit CR:

Description

When testing the new "sed" program, I discovered something rather surprising.

Expressions containing \< and \> don't work. Legacy sed gets it via a different regex library in libgen. FreeBSD doesn't get it at all.

In fact, POSIX doesn't say anything about these or the concept of "words" at all.

FreeBSD uses an interesting and non-portable solution of [[:<:]] and [[:>:]], which we seem to have "inherited".

Yet legacy Solaris needs \< and \>. Apparently we believe this extension is not in conflict with POSIX. Indeed, GNU sed uses this syntax as well.

We need to support \< and \>.

Note that fixing this a pre-requisite for FreeBSD sed.

Actions

Also available in: Atom PDF