Nothing beats sed for doing quick replacements on the command line, but if you try to naively use backreferences, e.g.
sed "s/(thursday|friday)/\1 next week/"
you'll get the (not very helpful) error message
illegal reference \1
The solution is simple - just add the -r command line switch (or --regexp-extended if you like being verbose):
sed -r "s/(thursday|friday)/\1 next week/"
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen