in reply to Regex - substitute
will turn "goodwood" into "gedwood" (only the first occurrence is replaced); "+" refers to "one or more". To replace all occurrences of "o+" in the string, use the "g" modifier as well:s/o+/e/;
will turn "goodwood" into "gedwed".s/o+/e/g;
|
|---|