![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
not even a short icq?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
![]() you can replace any string in all the files (html etc) in the same folder |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Feb 2002
Location: "A measure of a man is his post count". Write that down.
Posts: 900
|
HomeSite has a pretty decent advance replace as well.
-Tony |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
you showed me that the other night when I was looking for something different. How will this handle the wildcard strings?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
downloading homesite now, thnaks.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
Wolfy I'm not sure I'm understanding exactly what you want to do
![]() Anyway good luck. Hope the hosite does it for you. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
"hosite"
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
http://www.boolean.ca/replace/
extremely powerful replacement tool One of my secret weapons. (well its not really a secret)
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
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. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
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.
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
wow you guys are l33t.
thanks for the bk, cool program JC |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
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.
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Too lazy to set a custom title
Join Date: Oct 2002
Location: Far far away - as possible
Posts: 14,956
|
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.
__________________
XXX TLD's - Another mosquito to swat. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
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? ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 | |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
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.
__________________
Amen |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Industry Role:
Join Date: Dec 2003
Location: Wisconsin
Posts: 3,574
|
JC, gettin down on the farm babeeeeee!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Too lazy to set a custom title
Join Date: Oct 2001
Location: Spartaaaaaaaaa
Posts: 14,136
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 |
Confirmed User
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
|
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.
__________________
Amen |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
Confirmed User
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
|
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? ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |