![]() |
I need advanced search and replace technique and short icq
I want to replace all the <!---blah blah--->'s in my site - how do I do that besides a search replace with different amounts of wildcards?
I could do it one at a time, search and replace <!---*--->, <!---**--->, <!---***--->, etc - but that sucks donkeyballs. |
not even a short icq?
|
http://www.shemale.ws/hh/repl.jpg
you can replace any string in all the files (html etc) in the same folder |
HomeSite has a pretty decent advance replace as well.
-Tony |
you showed me that the other night when I was looking for something different. How will this handle the wildcard strings?
|
downloading homesite now, thnaks.
|
Wolfy I'm not sure I'm understanding exactly what you want to do :)
Anyway good luck. Hope the hosite does it for you. |
"hosite" :winkwink: doesn't look like it has what I want... I have a site that i want to find and replace a bunch of stuff in, and it all starts with "<!-----" and ends with "------>". A find and replace search with a wildcard (*) will not work because (*) only covers one character, I need something to handle multiplecharacters between two consistent variables ("<!---" and "--->"). I know there's a way to do this, help me people!
|
http://www.boolean.ca/replace/
extremely powerful replacement tool One of my secret weapons. (well its not really a secret) |
Shame you're not using some variety of unix... a simple regex would cover it:
sed 's/<!--.*blah.*-->/<!-- foo -->/g' < oldfile.html > newfile.html Guess it's a little more complex in other OSes. :upsidedow |
Quote:
Try using your method to replace a large paragraph of text using regular expressions and variables. its a lot less "complex" to do it with BK replace em. |
Quote:
|
wow you guys are l33t.
thanks for the bk, cool program JC |
Quote:
Command line tools CANT do some things BK can with regular expressions and multiple files. Not to mention saving replacement sets and settings to suit a specific website/project. |
Wolfy:
If the content is on a local drive... try CodeSwitcher. This will trail thru sub dirs and replace simple or complete blocks of html code and replace it with whatever you want. |
I'm not sure I follow... I do advanced s/r's on multiple files all the time. Some simple shell scripting allows me to cycle through the files, rename for backup or put the new versions in a separate directory, etc. Something like the following:
mkdir newstuff for a in *.php do sed 'some replacement string here' < $a > newstuff/$a done Or am I still missing your point? :helpme |
Quote:
You have never even used the software in question yet your gonna argue to the ends of the earth that you can do it with command line. Your comment was "its more complex" with this software and its its not. (you can replace an UNLIMITED sized paragrah in as many files as you want without scripting... you were talking about command line replacemnt methods now your suddenly going into scripting somthing to do replacement) So thump the unix bible elseware untill you actually try using the software your claiming your command line skills trump. |
JC, gettin down on the farm babeeeeee!
|
Wolfy
The progr that I use uses regular expressions as well (as you can see from the screenshot) and can get the job done, but the one that JC recommended looks much easier to use - just downloaded it and I'm checking it out. |
Actually handy File is easier to use but I like BK becasue it allows you to do more and arrange/save stuff in file sets.
|
Quote:
In fact quite explicitly said that whatever tool one is comfortable with is the one that'll be tapped to do the job. If the end result is that everything that needs to be searched and/or replaced gets done, then what's the difference aside from the comfort level of the person using it? You have something against unix? Did a unix guru anally violate your mother or something? :disgust |
All times are GMT -7. The time now is 08:47 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123