HomeClusterLabs Projects

Revert "Tests: cts-cli: Use extended regular expressions."

Description

Revert "Tests: cts-cli: Use extended regular expressions."

This reverts commit 48f59e65223e018f4a639c4c9c155cb62e7806a9, because
while it's true that GNU sed supports -E switch _now_, it wasn't the
case until about v4.1.5+ (silently, see 3a8e165, and explicitly since
v4.3, see 8b65e07), meaning that, for instance, RHEL 7 doesn't
officially supports it (as sad as it is):
https://bugzilla.redhat.com/show_bug.cgi?id=1564789

Also note that while there was an effort to standardize -E switch
in POSIX (http://austingroupbugs.net/view.php?id=528) it may have passed
without any affect so far (speaking of "2018 edition"):
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Definitely, it wasn't in IEEE Std 1003.1-2008 that, moreover, we don't
take for granted even 10+ years later (cf. ongoing parallel discussion
whether and how to check for %m specifier to scanf(3)), the change at
hand is not anything else but invalid. Also, -E implementation may
have been faulty until sed v4.5:
https://lists.gnu.org/archive/html/info-gnu/2018-04/msg00000.html

Note that one can make do without extended regular expressions, and in
turn, without '+' (or '\+' that is just a GNU-specific extension into
basic regular expressions syntax), since the respective substitute
can be used: "a+" ~ "aa*" (can be hefty for long patterns, but that's
what we reliably have).

Details

Event Timeline