Forum Moderators: phranque
It's supposed to find this:
($57<font size="-2">US</font>[smilestopper])
But it's not finding the last character (closing parenthesis) - only this is found:
($57<font size="-2">US</font>
I want to remove that code from 100's of pages, but it defeats the purpose if a ')' is left in it's place on the pages. Anyone know if a closing parenthesis is some kind of escaped character or special character?
Regards,
James...
\[\($[0-9]+<font size="-2">US</font>\[smilestopper\]\)\]
If you do not escape the []'s in the beginning and end of the expression you are searching for the individual occurrences of each character in the string.
For example in this expression: [smilestopper] you are searching for ssppeelmrtio the letters, order does not matter.
And in the whole thing:
[($[0-9]+<font size="-2">US</font>[smilestopper])]
You are looking for:
[[[<<("")>>]]$=0-9+/ffoonnttsize2USssppeelmrtio- ]
In this case it will probably not cause you any issues, because you are only searching for the one of each, but it is better form to have it right. It would suck to accidentally add a + to the end of it and change the wrong text on a bulk find and replace that cannot be 'undone'.
Make sure you test and retest before you make any changes in unopened files...
Justin
BTW: I think I usually escape \ quotes in DreamWeaver regular expressions too, but it's been a while, so you might want to test for yourself... If you have access to a Mac TextWrangler's Regex processing (especially in unopened files) is exponentially faster to anything DW can produce for bulk changes.
I tried making bulk changes with DW on a large DataBase and it took half the day to run about 10%, so I tried TextWrangler and it finished the remaining 90% in under 20 minutes.
Justin, could you give me the code that I should try - the smilestopper thing is confusing me? :) i just realized that it's not what you put in your reply but the board changed the 'smiley' in my code to say smilestopper. That's annoying. Here's the code again that works except for the ending parenthesis not being included in the 'highlighting' of found text:
[($[0-9]+<font size="-2">US</font>)]
I don't know enough about regular expressions to get into altering it too much, if you could give me something to try, I'd appreciate it!
Regards,
James...
That's the funny thing, NOTHING is ever found unless it's the code I used, with the exception of the missing ending parenthesis. In dreamweaver's find/replace, there's a checkbox to mark to indicate if it's a regex your using. Maybe that automatically escapes everything? So assuming that's the case, this works:
[($[0-9]+<font size="-2">US</font>)] (this is exactly as i put it in the search box and it finds all instances but only HIGHLIGHTS this:
($29<font size="-2">US</font>
^^^
So it misses the closing parenthesis which defeats the purposes of finding all instances to remove it.
Any thoughts?
James...