Skip to content

.sh.match[0] coupled with string substitution no longer works #944

@rgomes1

Description

@rgomes1

Using RedHat 9 RPM: ksh-1.0.6-14.el9.x86_64 (Version AJM 93u+m/1.0.6 2023-06-13), the following .sh.match[0] reference coupled with string substitution no longer works:

digits_only="${.sh.match[0]//[^0-9]/}"

Using ksh93 on RedHat 8/7/6 etc., the above statement works fine.

As a result, presently changing this operation to 2 separate statements as a workaround:

x_temp="${.sh.match[0]}"
digits_only="${x_temp//[^0-9]/}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions