[SOLVED] Find and replace quotes with underscores in file names

I was looking to replace all of the quotes in file names in a directory with underscores.  I seem to be having a problem doing so, though.  Running the find command:
find . -name '*[\`\'\"]*' -exec sh -c "mv -i '$0' '${0//[\`\'\"]/_}'" {} \;
I get a > inviting me to continue the command.  What am I doing wrong?
Last edited by gogi-goji (2010-01-03 02:19:13)

@lolilolicon: yeah the -exec part does give another level of quotes, so you can run into trouble with scripts inside -exec.
I didn't know you could give {} as an argument after sh -c and $0, that solves the problem of not knowing which quotes to use around it in the -exec part.
$ find -mindepth 1 -exec sh -c 'mv -v --backup=t "$0" "$(echo "$0" | sed s/[\\x27\"\`]/___/g)"' {} \;
mv: `./a b' and `./a b' are the same file
`./\'' -> `./___'
`./\'"\'' -> `./_________'
mv: `./$0' and `./$0' are the same file
mv: `./a' and `./a' are the same file
mv: `./$(echo crash)' and `./$(echo crash)' are the same file
`./"' -> `./___' (backup: `./___.~1~')
`./\'\'\'' -> `./_________' (backup: `./_________.~1~')
Or with the other substitution method, it doesn't interpret \x27 (you could use $(echo -e \\x27) or you have to use ...'\\\''...
$ find -mindepth 1 -exec sh -c 'echo mv -v --backup=t "$0" "${0//['\\\''\"\`]/___}"' {} \;
$ find -mindepth 1 -exec sh -c 'echo mv -v --backup=t "$0" "${0//[$(echo -e \\x27)\"\`]/___}"' {} \;
mv -v --backup=t ./a b ./a b
mv -v --backup=t ./' ./___
mv -v --backup=t ./___ ./___
mv -v --backup=t ./'"' ./_________
mv -v --backup=t ./$0 ./$0
mv -v --backup=t ./___.~1~ ./___.~1~
mv -v --backup=t ./a ./a
mv -v --backup=t ./$(echo crash) ./$(echo crash)
mv -v --backup=t ./_________ ./_________
mv -v --backup=t ./" ./___
mv -v --backup=t ./''' ./_________
mv -v --backup=t ./_________.~1~ ./_________.~1~

Similar Messages

  • Find and replace text in multiple Photoshop files?

    Hi there,
    Let us say I have six Photoshop files: 1.psd, 2.psd, ..., 6.psd. All of these files contain the word “LoremIpsum” in random text layers, within each document. Is there a way I can search for “LoremIpsum” in all documents and replace it with “Dolor Sit Amet”, all in one go? This is just an example, I need to replace various words, not just one.
    I have tried "batch find and replace" software (including powerful tools like Power Grep) but they do not work with psd files… Is there a javascript of external plugin for this kind of task?
    Thanks!

    You’re welcome, advice given here is free.
    If you want to donate something nonetheless you could do so over at
    http://ps-scripts.com/bb/
    Many of the same people used to contribute there as here and I for one have benefitted considerably from their generous advice on Scripting issues.
    A Script can read (or create) txt files, but I do not have a lot of experience with this.
    This might work (amend the line »var theTexts = readPref ("….txt", false);« according to your txt-file’s path):
    // replace text elements in type layers;
    // 2013, use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
              for (var n = 0; n < app.documents.length; n++) {
                        app.activeDocument = app.documents[n];
                        app.activeDocument.suspendHistory("replace text", "main()")
    // the opertation;
    function main () {
              var myDocument = app.activeDocument;
              var theTexts = readPref ("….txt", false);
              var theArray1 = theTexts.slice(0, Math.round(theTexts.length/2));
              var theArray2 = theTexts.slice(Math.round(theTexts.length/2), theTexts.length);
              alert (theArray1.join("\n")+"\n\n\n"+theArray2.join("\n"))
              for (var b = 0; b < theArray1.length; b++) {
                        replaceText (theArray1[b], theArray2[b])
    ////// reoplace text //////
    function replaceText (replaceThis, replaceWith) {
    // =======================================================
    var idreplace = stringIDToTypeID( "replace" );
        var desc22 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref3 = new ActionReference();
            var idPrpr = charIDToTypeID( "Prpr" );
            var idreplace = stringIDToTypeID( "replace" );
            ref3.putProperty( idPrpr, idreplace );
            var idTxLr = charIDToTypeID( "TxLr" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idAl = charIDToTypeID( "Al  " );
            ref3.putEnumerated( idTxLr, idOrdn, idAl );
        desc22.putReference( idnull, ref3 );
        var idUsng = charIDToTypeID( "Usng" );
            var desc23 = new ActionDescriptor();
            var idfind = stringIDToTypeID( "find" );
            desc23.putString( idfind, replaceThis );
            var idreplace = stringIDToTypeID( "replace" );
            desc23.putString( idreplace, replaceWith );
            var idcheckAll = stringIDToTypeID( "checkAll" );
            desc23.putBoolean( idcheckAll, true );
            var idFwd = charIDToTypeID( "Fwd " );
            desc23.putBoolean( idFwd, true );
            var idcaseSensitive = stringIDToTypeID( "caseSensitive" );
            desc23.putBoolean( idcaseSensitive, false );
            var idwholeWord = stringIDToTypeID( "wholeWord" );
            desc23.putBoolean( idwholeWord, false );
            var idignoreAccents = stringIDToTypeID( "ignoreAccents" );
            desc23.putBoolean( idignoreAccents, true );
        var idfindReplace = stringIDToTypeID( "findReplace" );
        desc22.putObject( idUsng, idfindReplace, desc23 );
    executeAction( idreplace, desc22, DialogModes.NO );
    ////// read prefs file //////
    function readPref (thePath, binary) {
      if (File(thePath).exists == true) {
        var file = File(thePath);
        file.open("r");
        if (binary == true) {file.encoding= 'BINARY'};
        var theText = file.read();
        file.close();
        return String(theText).split(",")
    In this case the comma is used to split the text into Strings in Arrays, if your search/replace texts include commas you could use something else, I guess.

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

  • 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

  • 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

  • Batch-find-and-replace.jsx

    Hi there, I wrote a batch-processing script for find change queries and thought I share it with you. You can get it over here 
    You can process GREP, TEXT, GLYPH and OBJECT searches. 
    Purpouse
    While creating books in InDesign with several documents we always come across some find change queries that need to be used again, and again, and again. To make this process easier you can just grab their names and put them into a list. The script will than try to process all your queries in one click. 
    prerequisites
    make sure you have a toml file.
    make sure the toml file is next to the script.
    make sure the toml file has the right formatting (see below in section TOML)
    if you want the script to autoexecute (without toml file selection), make sure the .toml file has the right name: "batch-find-and-replace.toml"
    make sure your fcqueries work right
    Usage
    Place the script and the toml file into your Scripts Panel Folder 
    define some find and change queries and save them via the InDesign dialogue.
    get the xml file names and add them to the "batch-find-and-replace.toml" file in the right spot. text search goes into text.files = [], grep search goes into grep.files = [] and so on. Make shure to remove the .xml from the filename. You can find these files on:
    Mac OS Users[username]\Library\Preferences\Adobe InDesign[Version][Language]\Find-Change Queries[query type] 
    Windows XP Documents and Settings[username]\Application Data\Adobe\InDesign[Version][Language]\Find-Change Queries[query type] 
    Windows Vista and Windows 7 Users[username]\AppData\Roaming\Adobe\InDesign[Version][Language]\Find-Change Queries[query type] 
    the .toml file should be located next to the script file and have the  appropriate name (batch-find-and-replace.toml). If so the script wont ask for the toml file and process the data right away. If not the script will ask you to select the .toml file.
    Thats it. Watch the magick happen.
    TOML
    Tom's Obvious, Minimal Language is a simple markup language that makes settings human readable. It is still in development and may change a lot. But still. It is a pretty easy language and can be learned by anyone.
    The basic toml filer looks like this: 
    # these are the basic settings
    # the MUST be there
    do_text = true
    do_grep = true
    do_glyph = true
    do_object = false
    # now the file names
    # they have to be in one line
    # the toml specs say you can break lines in arrays
    # but the toml.js does not allow that at the moment
    [text]
    files = ["my_first_text_find_and_change","another one"]
    [grep]
    files = ["somegrepsearch", "find tabs", "something else"]
    [glyph]
    files = []
    [objects]
    files = []
    MUST HAVE Settings
    With the do_text, do_object, do_grep and do_glyph you can define if the script should do the corresponding find and replace. Set them to true or false.
    CAN HAVE Settings
    In the [text],[grep],[glyph] and [objects] areas you can define the filenames that should be processed. Make sure the filenames are written right. If there is a file mentioned that does not exist the script will throw an error. It will try to process all the .xml files it can find.
    !IMPORTANT! you MUST remove the .xml from the filename in the list as shown above.
    The Script is here --> https://raw.github.com/...find-and-replace.jsx
    The basic .toml file here --> https://raw.github.com/...ind-and-replace.toml
    The Readme here --> https://github.com/...lob/master/README.md
    And the whole package here --> https://github.com/...e/archive/master.zip

    Great script, it worked perfectly with grep, text, glyph, not only worked with OBJECTS, because I do the same operation and does not work. Can you give me a hand? Thank you.
    In arquivo.toml is thus:
    # These are the basic settings
    # The MUST be there
    do_text = true
    do_grep = false
    do_glyph = false
    do_object = true
    do_all_docs = false
    # Now the file names
    # They have to be in one line
    # TomL the specs say you can break lines in arrays
    # But does not allow the toml.js que momento
    [text]
    files = ["_OVER_BLACK_TXT", "_OVER_CORPROF_TXT"]
    [grep]
    files = []
    [glyph]
    files = []
    [object]
    files = ["_OVER_BLACK_FILL", "_OVER_BLACK_STRK"]
    This is the image of the Scripts Panel folder:

  • Automatic Find and Replace

    Is there any way to apply some kind of macro in CS3 that
    would automatically run a list of commands to change things such as
    specific strings of text to specific links I define. For example
    any time the words "Jeff Jefferson" come up in my Dream Weaver HTML
    file they are automatically changed to a link (to bio page) of
    "Jeff Jefferson"?
    I know I can save my find and replace as a query but is there
    a quicker way that can run a list of these find and replace
    commands with a single push of a button?
    Thanks!

    booova wrote:
    >
    > I know I can save my find and replace as a query but is
    there a quicker way
    > that can run a list of these find and replace commands
    with a single push of a
    > button?
    >
    Once you have saved the search pattern, you can, if you wish,
    with one
    push of a button, apply the search and replace to all of the
    web pages
    residing on your computer.
    Mick

  • Reformatting files in Dreamweaver: Batch series of .dwr files (find and replace) consecutively

    I have to do complicated reformatting of an entire site. It's been simplified to a series of find and replace tasks for each file. Each find and replace string has been saved as a .dwr file. Currently I have to load and execute each .dwr file.
    How do you batch process or automate this task in Dreamweaver? In other words, queue up a series of .dwr files to be executed consecutively?

    OK here we go.
    This example, a simple Dreamweaver  Command Extension, will execute two Find and Replace commands in one go. (It can be any number of Find and Replace commands.)
    The first command replaces "the" and "this" with "phe" and "phis". The second command replaces <ul> ... </ul> with <ol> ... </ol>. (These of course can be any Find and Replace.)
    You need two files: a HTML file (for the  UI) and a Javascript file (for actions). I named them "Find and Replace Test.html" and "Find and Replace Test.js". (They can be any name.)
    Find and Replace Test.html
    <!DOCTYPE HTML SYSTEM "-//Adobe//DWExtension layout-engine 10.0//dialog">
    <HTML>
    <HEAD>
    <Title>Find and Replace Test</Title>
    <script src="Find and Replace Test.js"></script>
    </HEAD>
    <BODY>
    <form>
         <p>Are you sure?</p>
    </form>
    </BODY>
    </HTML>
    Find and Replace Test.js
    function canAcceptCommand() {
        return true;
    function commandButtons() {
        return new Array("Go!", "doIt()", "Cancel", "window.close()");
    function doIt() {
        dreamweaver.setUpFindReplace({
            searchString: "th(e|is)",
            replaceString: "ph$1",
            searchWhat: "document",
            searchSource: true,
            useRegularExpressions: true
        dreamweaver.replaceAll();
        dreamweaver.setUpFindReplace({
            searchString: "<(/?)ul>",
            replaceString: "<$1ol>",
            searchWhat: "document",
            searchSource: true,
            useRegularExpressions: true
        dreamweaver.replaceAll();
        window.close();
    Basically you can call any number of this pair of functions in the script:
    dreamweaver.setUpFindReplace(findAndReplaceObject);
    dreamweaver.replaceAll();
    Place these HTML and JS files in this directory:
    Dreamweaver App Directory/Configuration/Commands/ 
    Then in Dreamweaver, open "Insert" window. (You need to have a HTML file open in order to make the Insert window active.) At the top of the Insert window there's a category dropdown menu  ("Common" etc.). Do alt + click (ctrl + click) - then you'll see an item "Reload Extenesions" at the bottom of the dropdown. This will load this extension to DW. (Alternatively you can restart DW to load the extension.)
    Now it's ready to run the Extension. Open a HTML document you want to modify. Go to "Commands" on the menu bar. At the bottom of the dropdown there should be an item "Find and Replace Test". Select and enjoy
    Notes
    This example is set to perform the Find and Replace on the current document. You can change the scope to the entire site, or the selected files, etc, just like in the Find and Replace dialogue box. The API doc is here: http://help.adobe.com/en_US/dreamweaver/cs/apiref/WS5b3ccc516d4fbf351e63e3d117f9e09bcf-7ed a.html
    You can use dreamweaver.setUpComplexFindReplace(xmlQueryString) command instead. xmlQueryString is basically <dwquery> ... </dwquery> in your .dwr files, you can copy from your .dwr files. However xmlQueryString needs to be one continuous string (no line breaks), which can be a pain The doc: http://help.adobe.com/en_US/dreamweaver/cs/apiref/WS5b3ccc516d4fbf351e63e3d117f9e09bcf-7ed 9.html
    Command Extension general example in the doc: http://help.adobe.com/en_US/dreamweaver/cs/extend/WS5b3ccc516d4fbf351e63e3d117f53d6ec3-7fe 6.html
    I hope all of these make sense...
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • Enabling tabbing to controls on DW CS 4 Mac in Find and Replace

    I have used Dreamweaver on Windows for many years. I'm now working on the Mac.
    I have configured OS X Leopard for improved keyboard access to UI controls. This allows me to tab to dropdown (or popup) menu and use the keyboard to quickly select menu items. I realize this is a personal preference but personally I'm more productive this way. This setting affects the OS and appears to work in many applications. It doesn't appear to work in Dreamweaver CS4.
    I work on one PHP project that has hundreds of files. I routinely need to use Find and Replace to search in "Selected Files in Site" but often need to only search in "Current Document", so I'm routinely switching between these options. I'm also routinely toggle the "Use regular expression" option. On Windows I could change these settings without having to use the mouse. I could quickly tab (or shift-tab) from the "Find:" and "Replace:" text boxes to the "Find In:" and "Search:"  Dropdown Menus or the various "Options:" checkboxes, but find that one the Mac I have to use the mouse to change the dropdowns and checkboxes.
    Have I missed a Dreamweaver setting or a magic keyboard shortcut that would enable full keyboard access to DW's Find and Replace and other Dialogs?

    Yep.
    "A Better Finder Rename" is great for batch file renaming.
    http://www.versiontracker.com/dyn/moreinfo/macosx/11366
    Renamer4mac may be all you need.
    Best check out VersionTracker. In fact everybody should have this site bookmarked and visited daily.
    http://www.versiontracker.com/macosx/

  • Robohelp HTML 8 - Generating files with apostrophe in file name

    Before I start, I have read this thread
    http://forums.adobe.com/message/1062904#1062904 and several others, yet I still have questions.
    Previously I used Robohelp 5x, which worked perfectly.  Our user manuals are in MS Word and each have several topics that have apostrophes in the topic name (that are necessary in the topic).  Robohelp 5x would import the Word Document without issue and create HTML files that automatically replaced the apostrophe with an underscore.  All references (Index, TOC, etc) to those files also automatically changed to underscore.
    Fast Forward to Robohelp 8.0.2 (yes, I have the update).  Even if I go into the options and make sure "Use Underscores in file names" is selected - it no longer replaces the apostrophe with an underscore (though it does replace the spaces with underscores).
    Locally, when I generate the online help (WebHelp) and put it on our local webserver - it works just fine.  Even with the apostrophes in the file names and references.
    However, when the WebHelp files are hosted at our server hosting facility, any links within the Webhelp to files with an apostrophe result in a 404 error.  I have searched and searched to see if there is some kind of server setting to allow these special characters to be recognized in the file name but have not had any luck.
    Per the link at the beginning of this post, the issue in that thread was resolved by changing the file name of the HTML files.  I attempted to change the file name of the HTML files that RoboHelp created.  However as far as I can tell there is no way to do this within RoboHelp 8.  If I attempt to do it outside of RoboHelp 8, I need to import all of the "new" HTML files and all references (Table of Contents, Index, etc) now show broken links and need to be re-linked to this new topic.  This is not an option.  I have 12 user manuals that are updated on a regular basis and the renaming\relinking process would take forever.
    Any help would be greatly appreciated.
    Thanks,
    -Noob

    I was able to log into the server hosting facility and look at the html files themeslves.
    It appears that at some point (between when I created them locally and now) all of the apostrophes in the file names were changed to "Æ".  This blew my mind.  And sure enough if I plug in the URL and replace the apostrophe with "Æ" the page shows up just fine.
    From what I've been reading it looks like that may be related to the conversion from MS Word and "Smart Quotes".  I'm looking into that now, but any help would still be great.
    Thanks,
    -noob

  • Replace a string single quote(') with underscore(_)

    I have more than 100 tables in a schema.
    I have to find out if a string has a single quote in the column and replace it with an underscore.
    I have 2 columns CREATE_USER and UPDATE_USER in all the tables. Now i want to update the values if the string has a single quote in it.
    I tried it with execute immediate but it is not allowing underscore in the statement.
    DECLARE
       v_table_name    VARCHAR2 (30);
       v_column_name   VARCHAR2 (30);
       CURSOR c_name
       IS
          SELECT DISTINCT table_name, column_name
                     FROM user_tab_cols
                    WHERE column_name IN ('LOGIN', 'CREATE_USER', 'UPDATE_USER')
                      AND table_name NOT LIKE '%JN';
    BEGIN
       FOR rec IN c_name
       LOOP
          v_table_name     := rec.table_name;
          v_column_name    := rec.column_name;
          EXECUTE IMMEDIATE    'update '
                            || v_table_name
                            || ' set '
                            || v_column_name
                            || ' = REPLACE('
                            || v_column_name
                            || ','''',"_") where '
                            || v_column_name
                            || ' like "%''%"';
       END LOOP;
    END;
    /i am getting the below error:
    ORA-00904: "%'%": invalid identifier
    ORA-06512: at line 17Can anyone let me know what is the error in the statement and how to overcome it

    please try to replace your execute immediate with:
    EXECUTE IMMEDIATE  'update '
                            || v_table_name
                            || ' set '
                            || v_column_name
                            || ' = REPLACE('
                            || v_column_name
                            || ','''''''',''_'') where '
                            || v_column_name
                            || ' like ''%''''%''';You can check the statement when you take a look at the construction before like this:
    declare
      v_sql varchar2(1000);
    begin
       v_sql:= 'update '
                            || v_table_name
                            || ' set '
                            || v_column_name
                            || ' = REPLACE('
                            || v_column_name
                            || ','''''''',''_'') where '
                            || v_column_name
                            || ' like ''%''''%''';
       dbms_output.put_line(v_sql);
       execute immediate v_sql;
       ...Edited by: hm on 23.11.2010 01:43

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

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

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

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

Maybe you are looking for

  • Email address was changed now iMessage won't work

    my email address was changed from mine to my dads. he had changed my apple ID over to his email (i allowed him to use my ipad and this is what happened). i just changed my password and email back to mine and now my iMessage will not work. it keeps sa

  • I am trying to set up icloud but it keeps saying my account is disabled

    I am trying to set up icloud but it keeps saying my apple ID account is disabled? I have already changed my password....

  • How to remove empty tags from XML

    Hello, I have a XML file which contains some empty tags and some values with "?". I need to remove all empty tags and tags which have a value "?". Sample Data: <a> <b></b> <c> Hello </c> <d>world ?</d> <e>oracle</e> </a> Expected result: <a> <c> Hell

  • Albums and songs

    I got a new computer and transferred most of my songs sucessfully to my new itunes.However, I am still missing quite a few. I have tried extracting my music folder from my ipod, and it is now on my desktop, but I can't seem to get the folder into my

  • Archive objets in mapped external server

    Hello All, My client does not have and want to install the SAP Content server for Archivelink, my suggestion is to map a external server on SAP server (like F: for exemple) that we could see in AL11 and place (also read)  the files there. Another ser