regex(3): support for \< and \> word delimiters

Pedro Giffuni pfg at freebsd.org
Fri Jun 27 21:21:34 UTC 2014


Hi;

Il giorno 27/giu/2014, alle ore 15:25, Bryan Drewery <bdrewery at FreeBSD.org> ha scritto:

> On 4/21/2014 1:53 PM, Pedro Giffuni wrote:
>> Hello;
>> 
>> Is there any related standard (or in absence strong feelings)
>> about having \< and \> delimiters in regex expressions?
>> 
>> I have an old PR bin/153257 which actually comes from illumos:
>> https://www.illumos.org/issues/516
>> 
>> I don't use them but maybe it would help people moving their
>> scripts from Solaris.
>> 
>> Regards,
>> 
>> Pedro.
> 
> I don't know about a standard, but I find the lack of \< \> to be a
> frustrating difference with other platforms. [[:<:]] [[:>:]] work but
> are far more characters to type.
> 

Thank you for the feedback! I had closed the issue because I thought there was no interest.

Another thing that needed consideration was that I thought there was some work going on to replace libregex with libtre, which doesn’t support *any* such delimiter so committing the change would raise the bar for the replacement. Discussing it with Gabor it seems like libtre is not in the capacity of replacing our current libregex anyways so I guess Spencer’s libregex is here to stay.

While here, there is also the sed(1) syntax issue:

https://www.illumos.org/issues/586

Adopting both changes would probably reduce to a minimum the use of GNU sed in the ports tree, but such changes are likely to be controversial(?) and I don’t feel like wearing asbestos underwear at this time .. at least not for sed ;).

Pedro.




More information about the freebsd-standards mailing list