Skip to content

JavaScript: Replace numerical capture groups #5926

Description

@stefanhaerter

All RegExp static properties that expose the last match state globally are deprecated.

Source: MDN

See e.g.:

// get the number of the selector id and
// use it as the select key
/.*?_(\d+)/.exec(IDSelector);
IdentifierKey = RegExp.$1;

// Get field key and name by reg exp.
/(\d+)_(.+)/.exec($('#SelectFieldList option:selected').val());
FieldKey = RegExp.$1;
FieldName = RegExp.$2;

Related to #4824

Metadata

Metadata

Assignees

No one assigned

    Labels

    tidyingTidying of the code

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions