regex(3): support for \< and \> word delimiters
bdrewery at FreeBSD.org
Wed Jul 2 21:21:51 UTC 2014
On 6/27/2014 4:15 PM, Pedro Giffuni wrote:
> 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:
>>> 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:
>>> I don't use them but maybe it would help people moving their
>>> scripts from Solaris.
>> 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:
> 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 ;).
IMHO yes that is a good thing to bring over as it helps with people
coming from other platforms and improves portability with scripts. I
started on Linux and kept wondering why I had FILEe files all over my
system until I realized -i '' was required on FreeBSD.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 553 bytes
Desc: OpenPGP digital signature
More information about the freebsd-standards