3 ms·
It's originally from sed's "s"ubstitute command[1], and later incorporated into many other tools. The "s" at the front is the command name, which is followed by
by pdkl95 6y ago
It's originally from sed's "s"ubstitute command[1], and later incorporated into many other tools. The "s" at the front is the command name, which is followed by two sections delimited by "/"; these are regex pattern that is matched on the input, and the replacement string. The final "g" is an optional "global" flag that requests that all matches inthe input should be substituted, instead of only the first.
s/ ...matching regex... / ...replacement string... /g
The use in the parent post therefor means: "Replace every 'descriptive' in the text with the string 'proscriptive'."
[1] https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html https://www.gnu.org/software/sed/manual/html_node/The-_0022s...