Platform Support for GNU Extensions to Basic Regular Expressions by @wezm https://lobste.rs/s/edml2s #unix
https://www.wezm.net/v2/posts/2026/bre/
Platform Support for GNU Extensions to Basic Regular Expressions

0 comments

Lobsters

@wezm

I was just talking about those. It must be POSIX BRE Week. (-:

https://news.ycombinator.com/item?id=48703694

You could add a footnote about the standard finally, in 2022, standardising long-existing practice. Issue 7 didn't have this.

You can track the change's progress through the Open Group. Notice that they checked HP-UX and BusyBox, too.

https://austingroupbugs.net/view.php?id=773

https://austingroupbugs.net/view.php?id=1546

#SingleUnixSpecification #Unix #RegularExpressions #OpenGroup

@JdeBP hah yes I wrote this post over the weekend and was surprised to see another post on a similar topic show up on Lobsters yesterday.

Has it been standardised? The quotes in my article are from issue 8 and it still says they are implementation defined, but may be required in a future version.

@wezm

It's standardized to the extent that the escape sequences are valid, now. It's just up to the implementation to choose, from the two choices, and to document what they do.

With issue 7, using those escape sequences in a BRE would have made it ill-formed.

There's a fair amount of stuff in the world of POSIX and C and C++ where things are implementation-defined. It's a distinct thing from not actually being standardized.

The sad thing is that HP-UX will likely never be fixed. But #Illumos and #OpenBSD could be. They're both #HenrySpencer-derived, like #NetBSD and #FreeBSD, and dropping in that part of the Evans code for those three escape sequences wouldn't be that hard.

#SingleUnixSpecification #RegularExpressions #Unix #OpenGroup