Change all spaces to underscores in href attribute

Hello,
I've just realised all my linked documents are referenced incorrectly in my HTML code: I've used spaces in the file names and didn't replace the spaces by %20 in the URLs in the code. After reflexion, I decided to rename all my files so they contain "_" instead of spaces (done now) and hence now need to update my links (<a href="...">) in the code.
I've tried various combinations of specific tag/attribute, of regular expressions in the Find/Replace tool of Dreamweaver but I can't get it to do what I want. And I really don't want to do this manually.
Is there way to search for href="(anything)(a space)(anything)" where (anything) can be a letter, a word or several words (with/without digit characters)? To replace the spaces, I'd then use something along the lines of $1_$2 where $1 = href="(anything) and $2 = (anything)".
Emilie

I answered the same question from someone else yesterday. In the Find & Replace dialog box, make sure you select Use regular expression.

Similar Messages

  • How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    How can I change the space between a checkbox and text all at one time? I have a lot of checkboxes in my form.

    Okay, I haven't found a way to add an extra space using Find/replace, but you might be able to add some text wrap to the check boxes that will push the text away from them.
    Open Find/Replace and click the Object tab.
    Click the Specify attributes to find button to the right of the Find Object Format: field.
    Under Basic Attributes, choose Stroke and then the Black swatch (assuming the black swatch is applied to the strokes of your check boxes). If there are no other stand-alone objects in your form with a Black stroke, this should be all you need. (If there are Black strokes on your table cells, they will be ignored.)
    Click OK
    Click the Specify attributes to change button to the right of the Change Object Format: field.
    Under Basic Attributes, choose Text Wrap & Other > Text Wrap > Type: > Wrap around bounding box (2nd button from left)
    Under Offset, set a Right offset at the distance you'd like to add (I don't know what units you use, but the 3-5 points might work for your purposes...might take some trial-and-error to get it where you want)
    Click OK
    Click Change All

  • "Open With"- "Change All" corrupts your file (Resource forks, extended attributes, creation date)

    I finally know why some of my files get corrupted.
    If you use the following method to assign one kind of file to always open with the same application;
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8387.html
    (File -> Get Info -> Open With -> Change All)
    an extended attribute will be added to your file.
    You can examine that by typing "ls -l" in Terminal. If you see an @-sign after permissions than you have an extended attribute in that file.
    To see what it contains, type "xattr -l filname.jpg" in Terminal.
    Besides that is adds an extended attribute (which can be deleted with the "xattr --help" command) the modification date of the selected file will be changed.
    I think this is irritating because I wan't to keep my master photos with the same modification date as creation date.
    What else does it effect besides the modification date and to add extended attributes? Does my metadata get intact?
    (If you further want to make a backup copy on for example a FAT32 filesystem than your got a new problem. FAT32 doesn't support resource forks, so besides filename.jpg you will have an additional ._filename.jpg of 4kb)

    Doesn't sound like there is any corruption going on to me. It may change the date modified, but that should be expected since you modified the file.

  • HTML a href Attribute in Safari

    I have set up my personal homepage using a number of HTML a href attributes inside a table, so that when I click on one of these, it will take me down to the appropriate anchor defined by HTML a name. This works fine in Firefox, but does not seem to work in Safari 3.2.1. In Safari, it simply stays put and does not take me down to the appropriate anchor.
    Example of my HTML:
    <tr>
    <td>Favourites</td>
    <td>Airlines</td>
    <td>Architecture</td>
    <td>Art, Images, Pictures, Photography & Posters</td>
    <td>Books, Book Stores, Literature, Literary Societies</td>
    <td>Cars</td>
    <td>CCCV</td>
    </tr>
    Airlines
    Cathay Pacific
    Qantas
    Frequent Flyer
    Singapore Airlines
    Virgin Blue Australia
    <hr>
    Architecture
    Monument Environments
    <hr>

    Hi Alex,
    Have you tried dropping the <base> tag in the header? That should make the named anchors load quicker as well as the browser won't attempt to re-download the page all over again.
    Also, your DOCTYPE declaration seems a bit out of date. I don't think it's affecting anything as such but you might want to update it. I only mention it as the W3C validator check [marks it as being problematic|http://validator.w3.org/check?uri=http%3A%2F%2Fmembers.optusnet.com .au%2Falexcywong%2F&charset=(detect+automatically)&doctype=Inline&group=0].
    I should note that I can't actually test that recommended change above in Safari as I'm not on a Mac at the moment, but it does help with a browser that uses WebKit on my current machine.
    Hope that helps.

  • I have to select a file – get Info – and change – open with and change from preview to another program and CHANGE ALL everytime I boot up

    Why do I have to select a file – get Info – select – open with – and change from Preview to another program and click CHANGE ALL with every file extention everytime I boot up.

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.
    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    resetpassword
    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.
    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

  • Search and replace all spaces between quotes with uderscore

    Hello,
    I'm new on Powershell and I'm trying to make the script that:
    searches over file and replaces all the spaces which have been found between quotes;
    removes all quotes (except these which has not value eg "").
    For example:
    Source file:
    string3=string4 string="string1 string2 string23" string8="" string5="string7 string8"
    Destination file:
    string3=string4 string=string1_string2_string23 string8="" string5=string7_string8
    I have been created script that searches the data correctly
    $file="c:\scripts\mk.txt"
    $data=Get-Content $file
    $1
    $regex = [regex]@'
    (?x) # ignore pattern whitespace option
    (?<test>(["'])(?:(?=(\\?))\2.)*?\1)
    $data |% {
    if ($_ -match $regex){
    new-object psobject -property @{
    test = $matches['test']
    }#when adding "|select-object test" I'm getting the correct data
    I have stopped here on search / replace operation (from space to underscore, and by removing the quotes leaving the empty quotes non touched). Can you help me to finish the script?
    Thanks!

    Try this.  It uses the [Regex] Replace static method, with a script block delegate:
    $file="c:\scripts\mk.txt"
    $data=Get-Content $file
    $regex = '(\S+=[^"\s]+)|(\S+="[^"]+")'
    $delegate = { $args[0].value.replace(' ','_') -replace '"(.+)"','$1' }
    $data |% { [regex]::Replace($_,$regex,$delegate) }
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How can you create a paragraph style that removes all spaces and forces everything to lower case?

    Hi,
    Is there anyway of using GREP (or some other magical wizardry) to create a paragraph style that automatically removes all spaces and forces words into lower case?
    Strange request i know....I'm wanting to use it for datamerged email addresses.
    Thanks

    so doing it through InDesign is a work around I'm exploring.
    Excel has the 'LOWER' function and the ability to record macros for a quick find/replace on the spaces - so that's definitely a good option if it can't be solved purely in InDesign.
    You can change case via scripting in InDesign. This AppleScript (OSX only) will set the case of the selected paragraph style to lower. It would be possible to add some code that would strip spaces as well:
    tell application "Adobe InDesign CS6"
        activate
            set StyleList to name of every paragraph style of active document
        set myDialog to make dialog with properties {name:"Document Paragraph Styles"}
        tell myDialog
            tell (make dialog column)
                tell (make border panel)
                    tell (make dialog column)
                        make static text with properties {static label:"Choose a Style", min width:150}
                    end tell
                    tell (make dialog column)
                        set myPresetsDropdown to make dropdown with properties {string list:StyleList, selected index:0, min width:150}
                    end tell
                end tell
            end tell
        end tell
        set myResult to show myDialog
        if myResult = true then
            --+1 gets the correct name because list starts at 0
            set myStyle to item ((selected index of myPresetsDropdown) + 1) of StyleList
        else
            return
        end if
        destroy myDialog
        tell active document
            set myStyle to paragraph style myStyle
            repeat with j from 1 to (count stories)
                repeat with i from 1 to (count paragraphs in story j)
                    if applied paragraph style of paragraph i of story j is myStyle then
                        --defines a variable to replace the generic this_text parameter in the handler
                        set SCText to the contents of paragraph i of story j
                        set contents of paragraph i of story j to my change_case_of(SCText)
                    end if
                end repeat
            end repeat
        end tell
    end tell
    on change_case_of(this_text)
        set the_comparison_string to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
        set the_source_string to "abcdefghijklmnopqrstuvwxyz"
        set the_new_text to ""
        repeat with thisChar in this_text
            set x to the offset of thisChar in the_comparison_string
            if x is not 0 then
                set the_new_text to (the_new_text & character x of the_source_string) as string
            else
                set the_new_text to (the_new_text & thisChar) as string
            end if
        end repeat
        return the_new_text
    end change_case_of

  • Mavericks won't accept 'change all' command to open ALL pages files with v 4.3 app

    Hello again,
    I upgraded my MacBook Air mid June 2013 build to Mavericks at my Apple store. The download was fast, under 30 min., and the installation went well, also fast at about 40 minutes. All apps are working fine. I spent much time before taking the plunge to learn the pros and cons of this upgrade, and the biggest issue for me was the ability to keep using the older versions of Pages and Numbers.  The new, watered down versions cannot do what I need. I followed the instructions to select a Pages file in Finder, open the Info pane, and under 'Open with' selected the old version. Then, to apply this to ALL the files, I selected 'Change all...' and 'Continue'. But, it still lists the new version as default. So far, the only fix is to go through ALL my files and manually choose the old version for each. Very laborious. Am I missing something? It seems Mavericks will not accept to change them all for some reason.
    Thank you, Cinilla

    I have decided to dedicate this thread to the wonderful errors of Lion OSX. Each time I find a huge problem with Lion I will make note of it here.
    Today I discovered a new treasure of doggie poop in Lion. No Save As......
    I repeat. No Save As. In text editor I couldn't save the file with a new extension. I finally accomplished this oh so majorly difficult task (because we all know how difficult it should be to save a file with a new extension) by pressing duplicate and then saving a copy of the file with a new extension. Yet then I had to delete the first copy and send it to trash. And of course then I have to secure empty trash because if I have to do this the rest of my mac's life I will be taking up a quarter of percentage of space with duplicate files. So this is the real reason they got rid of Save As: so that it would garble up some extra GB on the ole hard disk.
    So about 20 minutes of my time were wasted while doing my homework and studying for an exam because I had to look up "how to save a file with a new extension in  mac Lion" and then wasted time sitting here and ranting on this forum until someone over at Apple wakes up from their OSX-coma.
    are you freaking kidding me Apple? I mean REALLY?!!!! who the heck designed this?!!! I want to know. I want his or her name and I want to sit down with them and have a long chat. and then I'd probably splash cold water on their face to wake them up.
    I am starting to believe that Apple is Satan.

  • How to Apply a Graphic Element's "href" Attribute Value on a Graphic Frame

    I have a graphic frame, which I wish to fill with a graphic image. The graphic frame appears as an element in the Structure, as it has a tag attached, and that element has a legitimate "href" as a full path to a graphic file. In UI mode, I have to drag that element onto the graphic frame in order for the graphic frame to be filled with the graphic file. How do I perform the same action in JavaScript?
    TIA
    mlavie

    I thought I should provide an explanation for what I meant:
    I am aware, of course, of how to use "Place". The issue here is that I have a Page that is a template, which includes a Graphic Frame. I want to open the page, and then update the Graphic Frame element's "href" tag with the path of a graphic file, and have that file then appear in the Graphics Frame. By default, InDesign does not redraw the Graphics Frame when you change the value for the "href" attribute - you need to drag the parent element onto the Graphics Frame.
    TIA
    mlavie

  • Problem changing ALL the colours for Visual Composer

    Hi All,
    <b>To set the scene:</b>
    I have SP13 installed.
    I have created a Visual Composer model, selected the option "Enabling styling of flex controls in portal themes", and deployed it.
    Then gone into the Portal > System Admin > Portal Display > Theme Editor > Selected the correct theme > Visual Composer > Flex Runtime Controls
    Then changed all the colours
    <b>The Problem:</b>
    I cannot change <b>ALL</b> the colours. There is this blue box that borders all the form headers which i cannot seem to change. I have provided a link to a screenshot below.
    <a href="http://base.google.com/base/a/2957240/D319638570621304478">Screenshot Link Here!</a>
    The field that I would assume fixes this ("Border Color of View Header") seems to have no effect?
    Anyone also had this problem or know of a solution?
    Thanks
    Conrad Nicholas

    Hi Conrad,
    This issue is a bug.
    It was brought to our attention and was already fixed.
    The fix will be available in the next release.
    Thank you for your input,
    Shay

  • [BPEL 10.1.3.3] href attribute in SOAP body

    Hi,
    An interesting issue appeared for one of my clients.
    Whenever there is a "href" attribute in the xml contents of the soap call to the BPEL process, following error occurs:
    <faultstring>ORABPEL-04110Cannot insert attachment.The process domain was unable to insert attachent into the datastore. The exception reported is: 0Please check that the machine hosting the datasource is physically connected to the network. Otherwise, check that the datasource connection parameters (user/password) is currently valid.sql statement: BEGIN INSERT INTO attachment( key, bin ) VALUES ( ?, '0' ) RETURNING bin INTO ?; END; </faultstring>
    The thing is - href has a special meaning in SOAP and is related to binary attachments, but here it's just a plain attribute which happens to be named "href".
    My Questions:
    1) is there a way to disable this special treatment of "href" in xmlparser or bpel engine/process?
    2) is this an error on the part of the caller to use "href" and expect it to not be treated in any special way?
    Thanks and regards,
    Bartek

    Hi
    I saw this behaviour in 10.1.3.1 as well. We have just patched up 10.1.3.3.1 and was hoping this will be addressed. It was not. :-(
    You should be able to work-around the not-found error by just correcting the URL in your browser. You will notice that all that went wrong is that it now has the domain name in all lower-case and since this is case sensitive it fails.
    We have stopped using mixed-case/uppercase domain names for now.
    It seems like a console only issue as the deployed BPEL process was working fine and callable on the mixed-case URL.
    Hope this helps.

  • Open with & Change All revert back to Preview. Can't set Photoshop instead.

    To help with analysis of this issue, my system is a G4 PowerMac running OS X Tiger 10.4.11. This issue also involves Photoshop 6.0.1 running in Classic mode.
    For my Photoshop files, the default application is no longer set as Photoshop, but instead as Preview. I would like to reset Photoshop as the default application for all files ending with the ".psd" extension. When I right-click (or control-click) on a file ending in a ".psd" extension, select "Get Info", then under "Open with" choose Photoshop, and finally click the "Change All" button, the "Open with" setting reverts back to Preview. I am able to change one file at a time, by selecting Photoshop under "Open with" and by then avoiding clicking on "Change All". Regrettably, it is not feasible to change the settings for every single ".psd" file on the computer in this one-by-one manner.
    Does anyone know how to change the default application globally for all ".psd" files to Photoshop, using the command line? I have searched for information on the Internet about the "defaults" command line utility, but have been unable to find an answer in that regard.
    Does anyone know of an alternative means by which to resolve this issue?
    Thank you for your time and help.
    -John

    Thank you for the suggestion, BDAqua. Regrettably, the problem continues to persist. The command at that link did indeed do something because the choices for "Open with" were different. Also, after running the command, Photoshop was not among the default choices, although it could be found after clicking on "Other". This might be shedding light on something. The copy of Photoshop is on a secondary hard drive in order to save space on the main hard drive. Maybe if Photoshop is on the main drive and then the command from the linked page is run, that might solve the issue.
    After the opportunity to test that, I plan to post a follow-up message. I must confess that it might be a few days before that happens.
    Thank you again for you help, BDAqua.
    -John

  • One layer style changing all the other layer styles? Turn this off?

    I'm sure there is an easy answer to this but I cannot seem to find it. When I am applying a style to one layer in CS2, and lets say I give it a drop shadow that is different (say it's at 110degrees rather than 90degrees) compared with the other drop shadows in my other layers, the curent layer style will change all the other layer styles across the board. I've looked all over for some setting to change so each individual layer keeps its own style but I can't seem to find this. I want each layer to have its own style attribute and not change the rest, how do I correct this?
    Thanks for your help!
    Tegan

    You need to uncheck the global light option in the layer styles dialog.

  • Want to change ALL photos in finished project from 'Tint' to 'Color Tint'

    Is there an easier way to change all photos that have a 'tint' effect to another effect without having to manually go into each image?
    I have a nearly finished 90 min doc that has a plethera of stills that I have added a 'Tint' from Image Control effect. However I have found that in many of my dissolves there seems to be some green frames thrown in the mix, (ONLY within the dissolve?) Anyhow, I found a work-around:
    By changing the original tint effect from dropdown----Effects; Video Filters; Image Control; Tint
    to
    Effects; Video Filters; Quicktime; Color Tint.
    For whatever reason, this corrects my random 'green frame' action.
    So does anyone know if there is some kind of batch edit that I can do, that recognizes all the images w/ Tint and change it to Color Tint in felt swoop?
    If not in FCP 5.1.2, maybe in 6?
    Thanks,
    Zack

    hi,
    boring but you can add the effect to the first still. Then apple -C it. Then select all the clips you want to change (apple-click will select no contigous clips) then select Remove Attributes from the edit menu. Select the Filters checkbox. Then select Paste Attributes from the edit menu. Select filters again and you're done.
    hope this helps
    adam

Maybe you are looking for

  • Have Windows OEM Product Key -but key is not accepted when Installing New Windows 8.1 Disk

    I was able to secure the Product Key for what I thought was a Windows 8.1 OS on my Toshiba notebook.  I believe my notebook ORIGINALLY had an OEM version of 8.0 (was pre-loaded when I bought the notebook) but at some point I updated the OS to 8.1.  I

  • Line item screen (Customer, GL or Vendor),

    Hi In any Display line item screen (Customer, GL or Vendor), I am not able to see the field called "User ID" or "Entered By". How can i see the above line item screens with the field "User ID, Entered by" field. thanx in adv

  • Novice needs help!! - film (XviD) downloaded onto desktop

    How do I now go about turning it into a dvd so that I can watch it on my dvd player? Simple steps , please! Is there a particular type of DVD disc or programme that can only be played on the my all regions DVD player?

  • WLC 2125 - Country code selection

    WLC Mode: AIR-WLC2125-K9 Version: 7.0.116.0 Here is the scenario, we have two WLC, one is located at SG and the other is located at MY (In test stage). Both WLC has configured with three Country Codes CN,MY and SG , as well as the Regulatory Domain 8

  • Problems with V Cast Media Manager on my phone

    So it was working fine.  I transferred some pictures and music over to my phone and was listening to it/using it as ringtones. The a few things happened: Some songs won't work as ringtones but I do not know why.  Somehow a few songs were transferred