Skip to Content
gnux

-E, --regexp-extended

Use extended regular expressions in the script (-r is accepted too).

An option of sedx.

Usage

sedx -E {script-only-if-no-other-script} [input-file]...
sedx --regexp-extended {script-only-if-no-other-script} [input-file]...

Details

ShortLongValueDefaultMeaning
-E--regexp-extendednoneuse extended regular expressions in the script (-r is accepted too)

Examples

Swap the first two comma-separated fields with extended regular expressions

sedx -E 's/^([^,]*),([^,]*)/\2,\1/' people.csv
Output
Lovelace,Ada,1815
Hopper,Grace,1906

Help in the terminal

gnux help sedx --regexp-extended

On this page