![]() |
anyone know of a search and replace program that can do this?
Say i hvae the following lines in a text file:
[blahblah]code[/blahblahblah] [asdfasfewfaf]code[/asasdfafdsfaf] [asdfasfweradvdsfafsadf]code[/asdfajsfoiwuasfdasdf] Is there a program where i can say i want code replaced with code$ where the $ is a count? so the result would be: [blahblah]code1[/blahblahblah] [asdfasfewfaf]code2[/asasdfafdsfaf] [asdfasfweradvdsfafsadf]code3[/asdfajsfoiwuasfdasdf] ? |
cant you just replace "[/" with "1[/"
|
oh whoops i get ya , never mind..
|
Can allways a program to do that ... :)
|
It's nothing major. Will just save me a few hours of repetitive work.
|
ok i just made a little tool to do that , are those the specific characters you want to do ?
|
Actually, this is what i'll need to replace:
<td align="center"><?=$thumb?></TD> <td align="center"><?=$thumb?></TD> <td align="center"><?=$thumb?></TD> <td align="center"><?=$thumb?></TD> <td align="center"><?=$thumb?></TD> with the <?=$thumb?> bit to be replaced with <?-$thumb1?> for example so perhaps using the $ as the replacement code in my original post wasn't the best idea. hehe. |
Code:
perl -e 'while(<>) {$i++; $_ =~ s/thumb/thumb$i/g;print;}' < file.html |
Arliss maybe?
|
| All times are GMT -7. The time now is 04:27 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123