Find and replace source code
i have to change a menu in 100 sites. The find and replace
menu is helpful but.....the menu has Behaviors/Effects, the find
and replace tool has find and replaced to all sites but the effects
from the Behaviors won't work, and it shows me that the effects are
there in the Behaviors panel but when i pres F12 the effects are
not there.
I'm not sure I understand your question but please tell us
HOW you want to
change this menu? And do you *REALLY* mean 100 sites, or 100
files?
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Edward82" <[email protected]> wrote in
message
news:fun8gm$58q$[email protected]..
>i have to change a menu in 100 sites. The find and
replace menu is helpful
> but.....the menu has Behaviors/Effects, the find and
replace tool has find
> and
> replaced to all sites but the effects from the Behaviors
won't work, and
> it
> shows me that the effects are there in the Behaviors
panel but when i pres
> F12
> the effects are not there.
>
Similar Messages
-
Find and replace $ amount code
I am wondering how change i change a code from <td align="center" bgcolor="#FFFFFF">
<font face="Tahoma" style="font-size: 11pt">
<strong style="font-weight: 400">$12.50</strong></font></td>
to this:
<td class="buy">$12.50</td>
We have a lot of pages to do, not all $ amount codes are the same but we need to end up using <td class="buy">$12.50</td> on all pages.Disclaimer: Please backup your files before applying this.
You can do this with 5 steps, without needing to wrestle Regex formulas:
Step 1
Open the search/replace
Find in: entire current local site
Search: specific tag -> select strong
With attribute -> select style and put font-weight: 400 in the box next to [=] button
Action: select Strip Tag
And click Replace All
Step 2
Open the search/replace
Find in: entire current local site
Search: specific tag -> select font
With attribute -> select face and put Tahoma in the box next to [=] button
Click [+] button at the left of With Attribute button, this will add another condition line.
With attribute-> select style put font-size: 11pt in the box next to [=] button
Action: select Strip Tag
And click Replace All
Step 3
Open the search/replace
Find in: entire current local site
Search: specific tag -> select td
With attribute -> select align and put center in the box next to [=] button
With attribute-> select bgcolor put #FFFFFF in the box next to [=] button
Action: select Set Attribute -> select class -> put buy into the box
And click Replace All
Step 4
Open the search/replace
Find in: entire current local site
Search: specific tag -> select td
With attribute -> select align and put center in the box next to [=] button
With attribute-> select bgcolor put #FFFFFF in the box next to [=] button
With attribute-> select class put buy in the box next to [=] button
Action: select Remove Attribute -> select align
And click Replace All
Step 5
Open the search/replace
Find in: entire current local site
Search: specific tag -> select td
With attribute-> select bgcolor put #FFFFFF in the box next to [=] button
With attribute-> select class put buy in the box next to [=] button
Action: select Remove Attribute -> select bgcolor
And click Replace All
Hope this helps... -
How do I find and replace text in PHP files?
How can I in CS3 make sitewide changes to the text in PHP pages without changing variable names etc that have the same name?
For example if I have an installation of a PHP forum and I want to change every instance of the word 'forum' to 'message board'...
If I used the 'inside tag' search with " as the tag, then if "" contained a variable called 'forum' it would also be changed and therefore corrupt the code....
Is there a simple way around this?
Thanks!
I'm using CS3 on Windows Vista.It looks like you're trying to find and replace source code, so you may be able to look at the various places that are looked at when finding and uncheck the ones that don't apply.
But, if it's all source code then that won't help. One thing that may work is to expand the search option - for example if the work "forum" that you're wanting to change it preceded by another word, or character or something that sets it apart, then do you find on that. You can expand that search phrase as far out in either direction that you need to to make it different, if of course that is practical in your situation.
The only other way I can think of is to somehow create an exception rule, but I'm not sure if that's possible or how to do it. -
In Edge Code can i do a find and replace?
In Edge Code can i do a find and replace on multiple lines of code or just a single line?
You can't do it on just one type of file. However, you can do find and replace in selected files. Ctrl-click to select the targeted files in the Files panel, and then choose Selected Files in Site from the Find In drop-down.
-
Dreamweaver CS6 "Find and Replace" not working
Since I've started working in DW CS6 I've noticed that the Find and Replace feature isn't working completely.
E.g. If I select a block of code, then open Find and Replace, tell it to find "<br />" and replace it with "</li>" it only replaces the first instance. The rest of the <br />'s are still <br />'s.
Is this happening to anyone else? I may have to switch back to CS5.bracdiver wrote:
** ANSWER/Workaround
Change the selection in the 'Search:' dropdown from the default 'Source:' to 'Text' or 'Text (Advanced)' and you will get the desired result.
bracdiver, your post may be useful in some examples, like the ones I posted above. However, this does not work in my intended example below (which is source code specific), where the actual source code needs to be replaced:
Sample
<p>These are true or false questions. Place your answer on the blank under each question.</p>
<ol>
<li>There are twelve in a baker's dozen</li>
<li>35% of people are going to school.</li>
<li>There are seven books in the Harry Potter series.</li>
<li>The longest running play is "Les Miserables"</li>
<li>There is no blank under this question. <i>Answer beside this question instead.</i></li>
</ol>
Using these options
Find in: Selected Text (first four list items)
Search: Source code:
Find: </li>
Replace: <br />___________________</li>
Options enabled: Match case
Desired output:
<p>These are true or false questions. Place your answer on the blank under each question.</p>
<ol>
<li>There are twelve in a baker's dozen<br />___________________</li>
<li>35% of people are going to school.<br />___________________</li>
<li>There are seven books in the Harry Potter series.<br />___________________</li>
<li>The longest running play is "Les Miserables"<br />___________________</li>
<li>There is no blank under this question. <i>Answer beside this question instead.</i></li>
</ol>
CS6 DW output:
<p>These are true or false questions. Place your answer on the blank under each question.</p>
<ol>
<li>There are twelve in a baker's dozen<br />___________________</li>
<li>35% of people are going to school.</li>
<li>There are seven books in the Harry Potter series.</li>
<li>The longest running play is "Les Miserables"</li>
<li>There is no blank under this question. <i>Answer beside this question instead.</i></li>
</ol>
Using your workaround (with 'Inside Tag' option set to li), this will not work as does not change any text at all. -
How to prevent find and replace from finding linked files?
I have a bunch of ASP pages that I need to update in the same manner with Find and Replace. In order to do this, I open all the files, use Find and Replace, and choose to Replace All in the Source Code of Open Documents.
Pretty straightforward, right? Except, if I have any include file statements, such as this:
<!--#include file=" yadda yadda"-->
DW opens these files on its own, and updates THEM as well.
This is a very frustrating behavior. I have been through the Preferences several times and I'm just not seeing any way to turn this off.
I have tried Googling this problem, and have seen absolutely no mention of it.
Does anyone know if this annoyance can be disabled?
Thanks.I would try selecting the specific files in the Files tab, then using "Selected Files in Site" and see what happens.
I think DW considers related files to be "open" (since you can edit them from within the main file they are related to) when that option is turned on and the files they're related to are open. -
Cannot Copy/Paste into Find and Replace
Help! I used to be able to do this, but now I cannot seem to
copy/paste source code into the Find and Replace dialog box. I am
stumped as to why this is a problem. I am running Dreamweaver MX
2004 (educational version). I would appreciate any help!!!http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=dd550772
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"sabina" <[email protected]> wrote in
message
news:eqimpu$f9j$[email protected]..
> Help! I used to be able to do this, but now I cannot
seem to copy/paste
> source
> code into the Find and Replace dialog box. I am stumped
as to why this is
> a
> problem. I am running Dreamweaver MX 2004 (educational
version). I would
> appreciate any help!!!
> -
How to find and replace with sequential values?
im building a website. it contains 12 main images per page and luckily according to my design the source code per page contains 12 <img> tags only (rest is background and stuff). now for many pages i keep using a particular page as template and then change each and every image by browsing and clicking. Now i want to make my work easy.
the images that i want to add in every page are sequentially file named. 001.jpg , 002.jpg .......... and so on.
So is there some way that i can use find and replace , to find the <img> tags and fill them all with values sequentially that is the first <img> tag containts 001.jpg and the second containts 002,jpg and so on .
the pages are many thats why i want to make this easy
thanks very much for helpWill they ever do this? I just wish Adobe would purchase TextPad and integrate it into Dreamweaver. In TextPad, from the manual:
Other TextPad options in the replacement string:
\i Generate a sequence number.
\i(N,M) Ditto, starting at N and incrementing by M.
So beautifully simple. -
Finding and replacing (international??) characters
I'm having trouble finding and replacing characters. Can anyone help me see the wood for the trees?
The characters in question are single quote characters (I asume) which have been entered in a windows box/word program/filemaker progremme or some other. As such, when I open them in a flat file on my Mac I see the following:
�A L O E�
where the "�" and the "�" should actually be single quotes.
On my Mac I can weed these out with the following:
public String cleanString(String text)
if(text != null && text.length() > 0)
if(text.indexOf("�") > -1)
text = replace(text, "�", "'");
if(text.indexOf("�") > -1)
text = replace(text, "�", "'");
if(text.indexOf("�") > -1)
text = replace(text, "�", "'");
if(text.indexOf("�") > -1)
text = replace(text, "�", "'");
return text;
}But on my server (Linux) this just isn't working. It doesn't find the characters. I've tried converting each character to unicode and looking for it that way.
public String cleanString(String text)
String cleaned = "";
if(text != null && text.length() > 0)
boolean flag = false;
for (int i = 0; i < text.length(); i++)
int j = (int)text.charAt(i);
String u = Integer.toHexString(j);
if("221a".equals(u))
flag = true;
continue;
if(flag && "b4".equals(u) || "2260".equals(u) || "a8".equals(u) || "c6".equals(u))
cleaned += "'";
flag = false;
else
if(flag)
cleaned += text.charAt(i -1) + text.charAt(i);
else
cleaned += text.charAt(i);
flag = false;
return cleaned;
}But the same thing happens. It works on my mac, but not on my server.
Part of my problem is that these 'offending characters' are actually comprised of two chars:
eg:
'\u221a' + '\u00b4'
Can anyone point me in the right direction?As such, when I open them in a flat file on my Mac I see the following:First you should open the file using the correct character encoding. Since the file originates from a Windows box, the encoding is probably Windows-1252, aka CP1252. You'll find the code for opening and reading here, just change "UTF-8" to "CP1252."
http://javaalmanac.com/egs/java.io/ReadFromUTF8.html
Next, you should not write non-ASCII characters in source code because it is not portable. If the source code is moved from one system to another, like from Mac OS X to Linux, the way the compiler translates bytes to characters may change. Only ASCII is safe, so it is better to use the portable Unicode escapes (\uXXXX) to represent non-ASCII characters in strings.
From Microsoft's own reference, the "smart" single quotes are U+2018 and U+2019: http://www.microsoft.com/globaldev/reference/sbcs/1252.mspx
so the code to replace them would be
text = text.replace('\u2018', '\'');
text = text.replace('\u2019', '\'');You would need to do the same for the double quotes, \u201C and \u201D
btw as there's a method for replacing charcters in the String class, you don't need to write a new one -
The Find and Replace "Done or Found" message is partially cut off for "Search" dropdown choices "Source Code, Text, Text (Advanced), but not for "Specific Tag". It appears to be a programming bug sizing the "Find" and "Replace" text boxes too big for the "find and Replace" window. Has anyone else encountered this problem.
Excuse me for resurrecting this, but I have been living with this same issue, and many more issues (I won't list them here), since migrating to CS5 (understood this thread is for CS6. However, my post is relevant none the less). If anyone has the fix I would love to know what they found. But sadly, I doubt there is one.
My system and display settings are also Win7 at 100% display. When doing a Find and Replace I can barely see what the results are for how many occurrences in the find window because the bottom is cutting off half of the text, just like the OP screen shot above. If the results reads "Done. 2 items found" it can easily be mistaken for "Done. 3 items found" if I don't study it carefully because of the bottom half of the "2" is cut off.
I don't want to rant here, but I will a little which I'll confess is the real purpose of my post. I am so disappointed in Adobe for so many different bugs in their software suite which they choose not to address, or even acknowledge as existing. I've had their tech support on the phone while they were recording my screen as I recreated issues for them, they never got back to me on any of them. I just got lip service how their engineers are looking into it and they'll get back to me. This of course was when CS5 still had free support under warranty.
At this point I'm numb to it all and I'm stuck using their software because I'm used to it, which ultimately is their goal anyway I'm sure. You win Adobe.
BTW...if anyone replies, please do not suggest the basic troubleshooting steps. All of the issues I've had exists after multiple re-installs on formatted hard drives and on both of my PCs made by two different manufacturers with different hardware specs (both exceeded min hardware requirements). Not to mention been through various techniques while on the phone with them..
Ahh... I feel better now. -
Find and replace advanced help
Firstly thank you for reading. I come here as a last resort to see if there's a solution to a problem I have.
Basically I need to rename several thousand images in a blog backup that is being transfered to a new host. The format of the images are as follow
<img alt="Revlon-pedi-egg" border="0" src="images/6a00d8341c873353ef011572419566970b-800wi.jpg" />
where each of the several thousand images has a unique alt tag and a unique image name
What I want dreamweaver to find the alt tag then replace the image name, so that the above image would become
<img alt="Revlon-pedi-egg" border="0" src="images/Revlon-pedi-egg..jpg" />
I have used replace expressions before as well as (.*) etc but I just can't seem to get this one to work.
Is this possible and if so would someone be kind enough to give me some pointers?FIRST MAKE A BACKUP.
Test this in several pages first.
In Dreamweaver Find and Replace, select the following options:
Find in: Current Document
Search: Source Code
Find:
<img alt="([^"]+)(".*?)src="images\/[^.]+
Replace:
<img alt="$1$2src="images/$1
Select Use regular expression.
Once you are confident that it's making the correct changes, you can then do it for an entire folder or the whole of the current site.
This assumes that all your image tags use double quotes around attribute values as shown in your original post. -
I wish to use VBA and Excel to programmatically open numbered Dreamweaver HTML (CS5) and find and replace text in the code view of these files, save and close them.
I have 5000 associations between Find: x0001 and Replace: y0001 in an Excel sheet.
I have the VBA written but do not know how to open, close and save the code view of the ####.html files. Please ... and thank you...
[email protected]This is actually the code view of file ####.html that I wish to find and replace programmatically where #### is a four digit number cataloguing each painting.... In 1995 I thought this was clever... maybe not so clever now :>)) Thank you for whatever you can do Rob!
!####.jpg!
h2. "Name####"
Oils on acrylic foundation commercial canvas - . xx X xx (inches) Started
Back of the Painting In Progress </p> </body> </html>
Warmest regards,
Phil the Forecaster, http://philtheforecaster.blogspot.ca/ and http://phils-market.blogspot.ca/ -
Find and replace in RTF Template
Hi,
I'm using a if statement in my template, but i need to change a value within this statement. It's being used multiple times, therefor it would be easier to do a find and replace, is there a way to do a find and replace within the RTF template? Already openede it in Notepad++, but no luck
OsmanI don't think there is a way to find and replace all.. You can view all the code by using Field Browser -> Show All and then replace the code and update one by one from there..
Thanks,
Bipuser -
Dumb Q: problem with Find And Replace window in Flash 8
Dear Flash Group,
apologies if this is trivial, it's my first day using Flash.
I downloaded a Flash project from
http://www.flashorb.com/articles/benchmark_files/flash-benchmark.zip.
This
flash calls into a web service at localhost:8080. I used the
'Find and
Replace' window within Flash Professional 8 to locate the
string
'localhost:8080' and replaced it with plain 'localhost'.
However, when I 'Debug the Movie' (Ctrl-Shift-Enter), it
still tries to
access port 8080! Obsiously, my replace command did not do
what I thought it
would do. I opened the FLA file in a binary editor, and saw 4
more
references to 8080, One if them in 'Properties' of a
WebServicesConnector,
but I cannot figure out how to find the other occurences.
Checking on google, I see lots of people having similar
problems, but no
solutions
Any ideas?
Regards, /george
PS. What do you guys do for code completion - is there a tool
that would
bring Flash on par with an professional IDE?george,
> when I 'Debug the Movie' (Ctrl-Shift-Enter), it still
> tries to access port 8080! Obsiously, my replace
> command did not do what I thought it would do.
Agreed.
> I opened the FLA file in a binary editor, and saw 4
> more references to 8080, One if them in 'Properties'
> of a WebServicesConnector, but I cannot figure out
> how to find the other occurences.
Might they be the result of that WebServicesConnector
reference?
> Checking on google, I see lots of people having
> similar problems, but no solutions
That's really odd, actually. I'm on these boards every day,
and I've
never heard of this issue. I don't *think* the Find/Replace
dialog visits
panel contents, such as the Component Inspector panel, but I
wouldn't swear
to that.
> What do you guys do for code completion - is there
> a tool that would bring Flash on par with an
professional IDE?
Well, Flash is a professional IDE, of course. By definition,
if you pay
for something, you have acquired a professional product or
service. I know
what you mean, though. Flash itself rocks, but the Actions
panel can be
glaringly weak. Personally, I use SE|PY to edit ActionScript.
http://www.sephiroth.it/python/sepy.php
Sorry I can't speak to your other issue. :-/
David
stiller (at) quip (dot) net
Dev essays:
http://www.quip.net/blog/
"Luck is the residue of good design." -
Find and Replace Issue Help Requested.
Hi all. I've been digging around for a couple of days and
can't seem to figure this one out. For starters, I have already
looked at the Regular Expression syntax and tried the MS word
clean-up option, but no luck. We have about 1,500 pages of content.
They are in DNN, so the pages are created dynamically.
Unfortunately, the page content was written in Word and then dumped
in DNN. We are trying to clean up the pages. We are grabbing the
content from Dot Net Nuke and putting it into Dreamweaver 8.0.2.
Then we are manually cleaning out things like:
<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />
and
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"
align=left>
We are using the Find and Replace funtion in Dreamweaver to
clean out these commands, but I know from the documentation, there
is an easier way to clean these pages.
Bottom Line: Since the pages are dynamically built, I know I
have to grab the page content and put it in Dreamweaver manually
and then put it back in DNN, but I am trying to find a way (using
Regular Expressions or something) to look for all the little
variances of MSO, <?XML, etc. in a straight shot. I would like
to find a way to use a wild card to look for all tags that have MSO
or Microsoft or ?XML in them and then replace them with a null
value. From what I can tell, the Find would have to use a wildcard
because the advanced find features don't carry what I am looking
for. Something like Find \<?xml * [<-wildcard] to \> to
grab the entire tag. The Find tag command doesn't work because the
tags I need aren't listed. Also, because the content is dynamic, I
can't do a Fins and Replace against the entire site for these
commands, but it would be nice to "Find" all of these items with a
single pass since the "Replace" value is always null.
The wildcard syntax and multiple Find instances are the main
questions. The wildcards seem to be character or space specific.
Sorry for the long explanation - I just don't want to waste
anyone's time typing responses to things I've already tried to do.
Thanks in advance for any help. This is my first time back in
the forums in about 4 years.sadamec1 wrote:
> Well David, you Findmaster - it worked! (At least it
found and highlighted the
> code). Now, I need to dig through what you sent me and
compare it against my
> regular expression definitions to find out how to grab
the rest of these
> phrases. You're the best. Thank you!
Glad that it did the trick. Just to help you understand what
I did,
there are two main sections, as follows:
<\?xml[^>]+>
and
<[^>]+(?=class=Mso)[^>]+>
They are separated by a vertical pipe (|), so they simply act
as
alternatives.
The first one searches for <?xml followed by anything
except a closing
bracket until it reaches the first closing bracket.
The second one is more complex. It begins with this:
<[^>]+
This simply looks for an opening bracket followed by anything
other than
a closing bracket. What makes it more intelligent is the next
bit:
(?=class=Mso)
This does a forward search for "class=Mso". It's then
followed by this
again:
[^>]+>
That finds anything except a closing bracket followed by a
closing bracket.
The bit that you need to experiment with is (?=...). It's
technically
called a "forward lookaround". The effect is that the second
half of the
regex finds <....class=Mso....>.
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/
Maybe you are looking for
-
Unable to log in with BI Publisher
We have set up OBIEE 11g (11.1.1.6.4) to use init block security. However, our setup does allow users set up in the Weblogic LDAP server to log in as well. Now we are trying to set up BI Publisher but are unable to make it work. Here are the symptoms
-
In the correction log, the value of custom status is registred as technical name, eg: E0012 as opposed to text value of the Status. How to get the text value or correct it? Thanks in advance. How to get the status name like "In Development" and not E
-
Hi All, I have created a universe based on an Excel file with columns as Material Number, Order Qty, Status and am reading this data from a Webi report. The data seems to be showing correctly the first time I create this new Webi and read data. If I
-
I recently bought Vizio blue ray disc player and it has BD live capability. What type of cable do I need to access BD live on my blue ray disc and how do I connect the cable so that I can access the BD live content on my blue ray disc.
-
I want to get into Hotmail but it says "Windows Live Network is unavailable from this site."
I have always been able to get into my Hotmail account until about two weeks ago. I updated Mozilla in hopes that this would help but it didn't. The message I get also says that it is unavailable from this site for one of the following reasons - The