in reply to A text replacement question
and call that for every file.perl -pni.bak -e "s/1 (\w{1,2}v\w{1,2})/2 $1/" filename
I am not sure how to achieve the same under linux.c:\> for %f in (*.html) do perl -pni.bak -e "s/1 (\w{1,2}v\w{1,2})/2 $ +1/" %f
Added a /g modifier just in case there can be more occurances in one line.perl -pi.bak -e 's/\b(\w{1,2}v\w{1,2})\b/g<a href="$1.html">$1<\/a>/" +filename
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A text replacement question
by Animator (Hermit) on Feb 15, 2005 at 12:52 UTC | |
by Anonymous Monk on Feb 15, 2005 at 14:09 UTC | |
|
Re^2: A text replacement question
by steamerboy (Initiate) on Feb 15, 2005 at 14:23 UTC | |
by Animator (Hermit) on Feb 15, 2005 at 14:37 UTC | |
by steamerboy (Initiate) on Feb 15, 2005 at 14:49 UTC | |
by Animator (Hermit) on Feb 15, 2005 at 15:35 UTC |