You're viewing a comment by Peteris Krumins and its responses.

January 31, 2010, 22:35

Hi Steve Krampach,

Can you use sed?

With sed it's really easy:

sed -e 's/\(This is a speech by \).\+\( in April\)/\1John Quincy Adams\2/'

Input:

This is a speech by John M Doe in April

Output:

This is a speech by John Quincy Adams in April

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.