This article investigates the cross-platform support for GNU extensions in Basic Regular Expressions (BRE), specifically focusing on the `+` syntax. It reveals that while POSIX leaves the behavior of `+`, `?`, and `|` implementation-defined, FreeBSD has supported these GNU extensions since 2020 via a specific flag.
Background
Basic Regular Expressions (BRE) and Extended Regular Expressions (ERE) have historically differed in syntax, particularly regarding quantifiers like `+`. POSIX standards allow implementations flexibility in handling escape sequences for BRE special characters.
- Source
- Lobsters
- Published
- Jun 30, 2026 at 03:33 PM
- Score
- 6.0 / 10