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/

Similar Messages

  • 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.

  • Find and Replace issue

    Hello all.
    I must have clicked something I should not have.
    In the past I could search for a string ( $username ) and no issues at all...it would find them.
    Now if I have the dollar sign ( $ ) in the find section it will find nothing.  When there are many entries for it to find.
    If I remove the $ it will find all the username entries.
    Thank you for time

    Here are my settings in the FaR box
    Find in: Current Document
    Search: Source code
    Options: Match case  **checked
               : Use regular expression  **checked
               : Match whole word  **unchecked
               : Ignore whitespace **Greyed out and unchecked
    Thank you

  • Help with find and replace regex

    Hello.
    I have a page listing about 50 services that have named
    anchors to a
    glossary page. Something like this:
    <a href="/glossary.html#Blogging">Blogging</a>
    And what I need is to have the glossary open in a new window.
    So how
    do I write a regex that will give me:
    <a href="/glossary.html#Blogging"
    taget="blank">Blogging</a>
    Thanks for any help
    Lance

    Thanks Brendon.
    It's Regular Expression; an optioin in the find and replace
    dialog.
    I've got to replace 50 of these anchors, each different.
    <a href="/glossary.html#Blogging">Blogging</a>
    <a href="/glossary.html#yadayada">yadayada</a>
    etc.
    to make them each open in a new window.
    <a href="/glossary.html#Blogging"
    taget="blank">Blogging</a>
    L.
    On Thu, 18 Oct 2007 14:40:46 +1300, "Brendon"
    <[email protected]>
    wrote:
    >Whats a regex?
    >Why not just do a Find and Replace? Specify the current
    local site, and
    >voila. Make sure you spell target correctly though ;-)
    >
    >
    ><@networkologist@@gmail.com> wrote in message
    >news:[email protected]..
    >> Hello.
    >>
    >> I have a page listing about 50 services that have
    named anchors to a
    >> glossary page. Something like this:
    >>
    >> <a
    href="/glossary.html#Blogging">Blogging</a>
    >>
    >> And what I need is to have the glossary open in a
    new window. So how
    >> do I write a regex that will give me:
    >>
    >> <a href="/glossary.html#Blogging"
    taget="blank">Blogging</a>
    >>
    >> Thanks for any help
    >>
    >>
    >>
    >> Lance
    >

  • Find and replace help needed, multiple variables

    Hi everyone,
    Im trying to find all urls in my code that start in a particular way but have a number variable at the end, see examples below
    <a href="/example/examplefolder/enquiry.asp?pid=123">
    <a href="/example/examplefolder/enquiry.asp?pid=485">
    <a href="/example/examplefolder/enquiry.asp?pid=284">
    and replace them with one url, see example below
    <a href="/example/examplefolder/default.asp">
    How can I use Dreamweaver find and replace to achieve this across my whole website?
    So far I only know how to find one thing and replace with another, rather than finding variables and replacing them with one thing.
    Thanks for your help with this!

    In the Find field of the Find and Replace dialog box, enter this:
    (href\s*=\s*\"\/example\/examplefolder\/enquiry\.asp)\?pid=\d+(\")
    In the Replace field, enter this:
    $1$2
    Select the "Use regular expression" checkbox.
    Explanation:
    The two sets of parentheses are capturing groups, which capture the actual values as $1 and $2.
    The \s* matches zero or more spaces.
    \" matches a double quote.
    \/ matches a forward slash.
    \? matches a question mark
    \d+ matches one or more numbers.
    I have written a two-part tutorial on using regular expressions, which can be found here: http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt1.html.
    Message was edited by: David_Powers (adding explanation of double quote).

  • Need Help With find and Replace

    I am a little green to this all. I am trying to find and
    replace a word inside the edit region and Dreamweaver will not
    change it, because it says its inside a locked region, but its a
    editable region?
    I have about 900 pages I need to make this change on and was
    relying on the find and replace tool to do that. I tried differn't
    advanced options, nothing seams to change it. I am using cs3.
    Thanks for any help

    Using Templates with a 900 page site is a crime against
    humanity. You reach
    the optimal size for Templates between about 50 and 100.
    The error you are getting suggests that there are coding
    errors on the page
    (perhaps even unrelated to ANY DW Template markup). We'd need
    to see the
    page to make progress with what that might be, as Alan says.
    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
    ==================
    "RyanWaters" <[email protected]> wrote in
    message
    news:ggs7fq$gnq$[email protected]..
    >I am a little green to this all. I am trying to find and
    replace a word
    >inside
    > the edit region and Dreamweaver will not change it,
    because it says its
    > inside
    > a locked region, but its a editable region?
    > I have about 900 pages I need to make this change on and
    was relying on
    > the
    > find and replace tool to do that. I tried differn't
    advanced options,
    > nothing
    > seams to change it. I am using cs3. Thanks for any help
    >

  • Find and Replace dialog box issue

    When I am in split mode, I get the Find and Replace dialog
    box up "Edit -> Find and Replace..." When I run a "Find and
    Replace" clicking the "Find All" the dialog box disapears and I
    have the Results checked in the Windows menu. When I go down to the
    little green arrow to bring back my dialog box - the Find and
    Replace text areas are clear and I have to re-paste the items into
    it to do the "Replace All" - this is much more time consuming. Why
    does my Find and Replace dialog box disapear and why does it lose
    the last "Find All" texts?

    pamelito2014 wrote:
    I tried to hover over them but nothing popped up to tell me what is what. So, I had to ask.
    You might have Tool Tips turned off in preferences...
    This is CS6, but I assume CC is the same or similar:

  • Help with removing a variable number using "find and replace"

    Hey, I have to remove a variable number from a large number of documents.
    How would I do this using "find and replace"
    <text><![CDATA[Coloured 250]]></text>
    250 is an example of the variable number that I will need to remove so it looks like this:
    <text><![CDATA[Coloured]]></text>
    Note: the text "coloured" is subject to change also.
    Thanks

    That's a possibilitly I'll explore.  Thanks for the alternate perspective!
    (5 minutes later)
    Oh well, it was a good thought.
    Unfortunately each line of raw original text may contain from 1 to 4 lines of final text.  In other words there is no consistency in the number of backslashes (hard returns) in each line of original text, and thus, when backslashes are converted to commas, no consistency in the number of data elements in each data set. 
    Sadly PS variables will not handle finding a source text line that does not have data for 4 variables.  So I either have to go back and add enough commas on each short line to make four individual data elements for each data set... or I simply deal with the hard returns within Photoshop.
    I think I've reached the limit of automation on this process.

  • Find and Replace help

    Hi people,
    First time on here....
    Have a little problem...
    I want to use the regular expression functionality in the
    find and replace dialog. I want to replace each "; " with
    ";{carriage return}"
    tried using
    lookfor: ;
    replace ;\r
    \n, 0x09, and all sorts...
    could someone give me some pointers please?
    much appreciated.

    On Tue, 18 Apr 2006 15:38:09 +0000 (UTC), "ToonMariner"
    <[email protected]> wrote:
    > I want to use the regular expression functionality in
    the find and replace
    >dialog. I want to replace each "; " with ";{carriage
    return}"
    Find: ;
    Replace with: ;\n
    works for me.
    Gary

  • XML tag markers moved: Find and Replace causing problem in xml elements

    Hi All,
    I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
    See the screen shot below, then you may get better idea. And help me to overcome this issue.
    This is just an example to show you what i'm trying to say, there are so many cases like this.
    Original text/ Before doing find replace
    After replacing
    Green4ever

    Hi Peter and John,
    but it seems to me that the example is looking for any space that
    follows a semi-colon and has two word characters following it, and
    repalce that with an em space. I think you could do the same using look
    behind and look ahead and not need to replace the found text.
    Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
    Original/Before Replacing,
    (Consider there is another case here, instead of em-space some times normal word space will also be there)
    Using the Grep:
    Find What---------> ^(\d+\.(?:\d+)?)~m
    Change To------------->$1\t
    After Replace:
    Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
    Green4ever

  • Find and replace in files does not refresh when changes are made

    Using RH10, I search for a term with the Find and Replace Options pod. I use the Find Results list as a reference only, and open each file from the Topic List. I do this instead of opening the topics from the Find Results tab because I want to see the WYSIWYG changes. Anyway, I make my edits and delete the search term from each topic. Then, to make sure I have done all the work, I run the search again. I expect to see no or at least fewer matches than before, but I still get some or all of the same results as before, even though I double-check the Design and HTML views of the topics and even check the source of a topic separately in Notepad, all indicating that the search term is gone from the topic.
    There is some ridiculous lingering or echo going on. I make sure to select Look in: <Current Project>, and the paths of all the Find Results files are fine. How do you refresh the search so that this echo doesn't occur?
    Also, I close the Find and Replace Options pod, reopen it and start the search again, and the same results are there.
    Message was edited by: DMilkes

    Hi there
    To avoid the message about the file being modified, close all topics in the editor before commencing with any find and replace operations. The message is produced because you have the aforementioned topics open in the editor.
    As you mention "Find and replace in files", I'm guessing you are referring to version 8. I just opened version 8 and performed a find and replace to confirm. There is a button allowing you to clear all.
    On the clicking and dragging to create a link, it's never worked that way. You simply cannot drag from the Topic List pod to do it. But you can from the Project Manager pod. Perhaps you should consider submitting a Wish Form to ask for the ability to click and drag from the Topic List pod to create links.
    As far as rearranging your topics into different folders, as long as you do it from inside RoboHelp you shouldn't be destroying any links. RoboHelp will update references for you as you move things around. The only issue is if you are automatically creating your TOC structure based on the project structure. But usually that's a one time shot. From there forward you just manage things using the TOC editor.
    Hopefully this helps... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Find and Replace Japanese characters in pdf file on iPhone

    Hi eveybody !
    I want to find and replace Japanese characters in pdf on iPhone.
    I using zlib to deflate stream - endstream block and extract text.It's work fine with latin-text.
    But when i work with japanese characters , I don't know how to do it ?
    I decode a sample japanese pdf file, and I know that each Japanese characters are performances as hex string : "<01b7><0e230a23>..."
    But i don't know how to convert Japanese characters to the hex string like that.
    Can evrybody help me?
    Thanks!

    Searching is the same process as extracting - since it's about turning page content into something understandable.  So that still remains what you need to learn/understand - of course, referring back to all the previous sections about font formats, etc.
    Replacing in PDF is EXTREMELY DIFFICULT for two reasons - subset fonts and explicit glyph positioning.  Have you determine (conceptually, if nothing else) how you plan to addresses these two issues?
    PDF doesn't do UTF8 for page content - so don't worry about that.

  • Multi find and replace

    When using Multi find and replace the system does not replace
    all files. Any suggestions?

    Hi 1motivate and welcome to the RH community.
    The in built find and replace tool (if that is what you are
    using) has some limitations and is known to have issues. Most of us
    use a third party tool. FAR and BkReplacem being two of them. My
    own personal favourite is
    FAR as it does a lot more
    than find and replace (even author help files!) and is relatively
    cheap. Others swear by BkReplacem and this is freeware.

  • How to find and replace any string between " "

    Hi everyone,
    Here my sample
    String szTest;
    szTest = "Yellow banana";
    szTest = "Blue monkey";
    szTest = "Red mango";
    szTest is only needed when it's in testing progress. Now I want to put all of that in the /*comment*/ so the released program won't run those code any more (but still keep szTest so I can use it for future develop testing).
    So Here what I want after using the Find and Replace Box:
    //String szTest; //Manual
    /*szTest = "Yellow banana";*/ //use find and replace
    /*szTest = "Blue monkey";*/ //use find and replace
    /*szTest = "Red mango";*/ //use find and replace
    I think I can do this with Regular expressions or Wildcards. But I don't know how to find and replace any string between " and ".
    Find: szTest = " ??Any string?? ";
    Replace with: /*szTest = " ??Any string?? ";*/
    Thanks for reading.

    Hi Nathan.j.Smith,
    Based on your issue, I suggest you can try the Joel's suggestion check your issue again. In addition, I find a MSDN document about how to use the Regex.Replace Method to match a regular expression pattern with a specified replacement string,
    maybe you will get some useful message.
    https://msdn.microsoft.com/en-us/library/xwewhkd1(v=vs.110).aspx
    If the above suggestion still could not provide you, could you please tell me what language you use to create the program for finding and replace any string using regular expression so that we will find the correct programming develop forum to support this
    issue?
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Find and replace crashes Dreamweaver 5.5

    When trying to use find and replace dreamweaver always crashes. I've tried clearing the cache from instructions  of this link and it didn't work. http://forums.adobe.com/thread/494811
    Please help!

    Does the issue occured after you made any H/w or S/w changes on your MAC(may be after upgrading your OS)?
    If so, have you tried restoring dreamweaver's preferences? Follow the link below.
    http://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html
    Make sure you backup all your current preferences if you need them again.

Maybe you are looking for

  • Delivery header output issue

    Hello every one, We have a plant assigned to multiple storage locations(A,B) and we have different printers at both the str.locations.(1,2) Output procedure is assigned to the delivery header. when ever i use storage location A it should print on pri

  • Early 2008 Mac Pro wakes up from sleep with Mavericks.

    Ever since I upgraded to OSX Mavericks on Tuesday, my early 2008 Mac Pro keeps waking up from sleep mode every couple hours. It goes back to sleep again on its own though after a minute, so I'm thinking it's some kind of new automated feature that I'

  • Inserting Bridge Photo Gallery into webpage

    I have made the changes to the web gallery index page (from Bridge) as indicated in http://foundationphp.com/tutorials/gallery/embed3.php  in DW.  However, I normally do not use DW, but need to now.  I have the new web page where I want the gallery t

  • How to find page sizes in a document with multiple page sizes

    Hi Ive been given a document that has multiple page sizes in it how do i find the size of each individual page. i tried document setup but that only brings up the size of the first page

  • Working with big vectors

    My program works with a large vector of objects. The problem is that the vector is to big to be stored in memory. Is there any utility that will store the whole vector in a file and seamlessly cache parts of it to memory ? Thanks.