How to change double spaces to single space

For some reason that I don't know about, the majority of the
time that I download a PHP or HTML document from the web server to
my local PC the document gets double spaces injected into each line
of code. In HomeSite there is a simple command in the menu to
change double spacing to single spacing. Why does Dreamweaver not
have this, or if it does, then where is it? I cannot spend all of
my time mannually removing each double spaced line. I tried the
search and replace for this, but then I loose my tab formatting and
it makes the code hard to read. Can anybody help or point me to an
extension that works for this or sdomething? Or, do I just need to
reload HomeSite and work in it instead of Dreamweaver?

"carl@csi" <[email protected]> wrote in
message
news:fgn8sd$bn4$[email protected]..
> For some reason that I don't know about, the majority of
the time that I
> download a PHP or HTML document from the web server to
my local PC the
> document
> gets double spaces injected into each line of code. In
HomeSite there is a
> simple command in the menu to change double spacing to
single spacing.
> Why
> does Dreamweaver not have this, or if it does, then
where is it? I cannot
> spend
> all of my time mannually removing each double spaced
line. I tried the
> search
> and replace for this, but then I loose my tab formatting
and it makes the
> code
> hard to read. Can anybody help or point me to an
extension that works for
> this
> or sdomething? Or, do I just need to reload HomeSite and
work in it
> instead of
> Dreamweaver?
Open the find/replace dialog, and check "Use regular
expressions".
then type the following in the search box
\n\s*\n
and type Ctrl-Enter in the replace box
this should replace double line-breaks (with or without
whitespace between
them) with a single one.
Joris van Lier

Similar Messages

  • InCopy GREP: how can I search for a single space after a sentence?

    In the Find/Change box in InCopy, there's a preset GREP command: "Multiple Space to Single Space." In the books I'm working on, we need to do the opposite. I know I should learn regular expressions, and I'd like to, but frankly I'm pressed for time, so here's my question:
    What is the exact regular expression I should paste into the Find/Change box to find single spaces before sentences?
    Thanks!

    In Find, in the GREP area, you need to enter
    Find What: \. \S
    backslash-period = find a period
    tap the spacebar for a space ...there's a space after the period above
    backslash-cap S = not whitespace
    If you want to change it to two spaces after a period, group the Find expression so you can replace the Found text in the Change to field.
    Find What: (\. )(\S)
    Change To: $1 $2
    (I added a space after $1 so IC adds a second space after the period)
    AM

  • How to change the color picker/color space view?

    I wanted to change the color picker/color space view to what it looks like in the other Adobe programs. I have gotten used to using the color picker from the other programs and I have had problems with the look and function of this color view.
    In InDesign the color picker looks like this:
    And the Photoshop/Illustrator/etc. looks like this:
    I've tried changing the "Convert To Profile..." and the Transparency Blend Space, but neither have done anything to what I want to be done.
    Is there some way to change this in InDesign?
    Note: I want to change the looks of the gradient-like area if that isn't obvious.

    I was wanting to do the same change as you, until I saw your two images.
    Within the InDesign image you've selected a dark blue colour (R:16, G:49, B:152)  AND you've got the (R)ed channel selected.
    Within the Photoshop image you've selected a white colour(R:255, G:255, B:255)  AND you've got the (H)ue channel selected.
    In Photoshop I can recreate both of your images by having the same settings for RGB/CMYK and selecting the same channel item as you have in those images.
    That's all.
    There is no difference between the two colour selection dialogs except where the HSB, RGB, CMYK and LAB are placed.

  • How to change double to int?

    i got a double
    double x
    x = 3 * 1.2
    how to change x to int type?
    thx a lot

    You can't change x, it's declared as type double.
    You can retrieve the value of x as an int by using a cast:
    int y = (int) x;

  • How to change double random value to int value?

    I need to change double random number to int in my program. Please help
    Here's my program
    import java.io.*;
    class GuessingGame
    public static void main( String[] args ) throws IOException
    int guess;
    BufferedReader stdin = new BufferedReader(
    new InputStreamReader( System.in ) );
    String input;
    double somevalue;
    int attempt = 0;
    boolean win = false;
    somevalue=Math.random()*10 ;
    while ( attempt < 3 && !win )
    boolean correct = true;
    //First Guess
    System.out.println("\nI am thinking of a number from 1 to 10.");
    System.out.println("You must guess what it is in three tries.");
    System.out.println("Enter a guess:");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Second Guess
    System.out.println("Enter a guess: ");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Third Guess
    System.out.println("Enter a guess: ");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Result
    if ( correct )
    System. out.println("Right");
    System.out.println("You won the game!");
    win = true;
    else
              System.out.println("The correct number was:"+ somevalue);
    System.out.println("You lost");
    attempt = attempt + 1;

    Ceranith, thanks. It works now. You were very helpful. I searched and found your answer on a similar question using nextInt(int n). I tried to use that approach to my program (for learning purposes)as well, but it didn't work. Could you help to find out what's wrong?
    Here it is:
    import java.io.*;
    import java.util.*;
    class GuessingGame
    public static void main( String[] args ) throws IOException
    int guess;
    BufferedReader stdin = new BufferedReader(
    new InputStreamReader( System.in ) );
    String input;
    int attempt = 0;
    boolean win = false;
    int n=10;
    Random numb = new Random();
    int somevalue = numb.nextInt(int n)+1;
    while ( attempt < 3 && !win )
    boolean correct = true;
    //First Guess
    System.out.println("\nI am thinking of a number from 1 to 10.");
    System.out.println("You must guess what it is in three tries.");
    System.out.println("Enter a guess:");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Second Guess
    System.out.println("Enter a guess: ");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Third Guess
    System.out.println("Enter a guess: ");
    input = stdin.readLine();
    guess = Integer.parseInt( input );
    if ( guess != somevalue )
    correct = false ;
    System. out.println("Wrong");
    //Result
    if ( correct )
    System. out.println("Right");
    System.out.println("You won the game!");
    win = true;
    else
              System.out.println("The correct number was:"+ somevalue);
    System.out.println("You lost");
    attempt = attempt + 1;

  • How to change the skin of  a space page dynamically

    Hi,
    how can we change the page skin( for example font size to different size based ) based on the user.

    See explenation in the other thread: Change skin on button click

  • How do I make SPOOL Output single space?

    This output double spaced.
    SET SERVEROUTPUT ON FEED OFF TERM OFF ECHO OFF TRIM ON DEFINE OFF;
    SPOOL c:\temp\output.txt
                    SELECT DBMS_METADATA.GET_DDL('PROCEDURE',a.object_name,a.owner) as "PROCEDURE"
                    FROM dba_objects a
                    WHERE OWNER  = 'MYUSER'
                    and a.object_name not like '%BIN%'
                    AND object_TYPE ='PROCEDURE';           
    SPOOL OFF

    Basically, I work as a lighting technician in a theatre and our lighting control console accepts MTC as a way to sync the lights up with music. I want to have my macbook pro generate the timecode to send to the lighting system but the actual audio source has to come from somewhere else (like another machine next to the sound board operator).
    What do you think is the best way to do this with logic and mac machines? I know there are theatre specific softwares developed for this but I already own logic.

  • How do change boot disk from single user mode?

    My G5 hangs when booting at the blue screen while "Loading printing services...". Attempting to boot into safe mode only hangs at the grey gear screen. It will, however, successfully boot into single user mode. I've run fsck but no change in bootability. I have another disk in the machine that has Tiger on it. How do I change the boot disk from the single user prompt?

    You can hold c and boot off the installer disk and select disk utility repair disk/permissions
    or you can hold option to boot off Mac OS X on another drive, like a clone and run Data Rescue to recvoer your files.
    It does sound bad, you can try going through these
    http://docs.info.apple.com/article.html?artnum=106464
    But I think you'll need a fresh install, hopefully you have been backing up/cloning to a external drive.
    http://homepage.mac.com/hogfish/Personal11.html

  • How to change double i = Math.random(); value to (int) value

    I am trying to find out how to convert a given double value to integer, which is, to conver double myNumber = Math.random() to (int) value. Here is the sample program look like this.
    Thank you for the help.
    import javax.swing.JOptionPane;
    public class numbers
    public static void main(String[] args)
    int upperLimit = Integer.parseInt(JOptionPane.showInputDialog
    (null, "Enter the upper range integer."));
    double myNumber = Math.random();
    //Test of Random numbers.
    System.out.println("The Upper random number limit is: " +
    myNumber * upperLimit);
    } //End of main.
    } // End of class.

    Not sure exactly what you want and why you want to change the double to an int. I'm assuming by this you want to generate random integers, from 1 to the upper limit the user enters? If so, this is how I would do it:import java.util.*;
    import javax.swing.*;
    public class Numbers
        public static void main(String[] args)
            int upperLimit = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter the upper range integer."));
            Random r = new Random();
            int myNumber = r.nextInt(upperLimit) + 1;
            System.out.println(myNumber);
    }

  • Is there a way to change double-click to single-click?

    My dad has trouble double-clicking on folders. He recently got an iMac, and he's used to the single-click option on Windows. Is there a way to set up single-click on Mac OS X?

    The lack of single click mode this is the most glaring, problem that the mac has, it globally affects everything you do. Macs are great mostly because they are "dumbed down" but lets face it there are some qualities that are missing because the OS development has not been any comparison to windows. Macs have only had a two button mouse for a couple of years! If you are a light user of email, photos, etc (most of us) you will say whats all the complaining about? ..but if you use your mac for real work & know the advantages of single click mode, it is a nightmare. A person has to know ALL the adavantages to single click mode to appreciate what I am saying.

  • Replacing many spaces with single space in a string

    Hi!
    I have the following strings:
    "Eric       B"
    "John                 A"
    "Mary Anne   C"But I want them to be like this:
    "Eric B"
    "John A"
    "Mary Anne C"Do anyone have an idea how to do this?
    Edited by: suladna on Aug 2, 2008 5:42 AM

    Use this:
    String s = "Mary    Anne   C";
    System.out.println(s.replaceAll("\\s+", " "));Edited by: prigas on Aug 2, 2008 6:15 AM

  • I have Windows 7 Home premium, I likeed Wordpad to just type a letter or a document when I had XP, but now the program will not single space . I did everthing i

    I am unable to "single space" a document in Wordpad now that I have a new emachine with windows 7 preinstalled. I used Wordpad when I had Windows XP OS and loved it,however in the menu of Wordpad 7 at the top of the app it shows what to click to single space your document, but it does not work. I researched the problem with different sources, and all said they were experiencing the same issue. I liked Wordpad program in Xp to just type simple documents and letters, but I cannot use single space in Window 7.
    Does anyone know how to address this issue. I just want a simple program that is easy to understand.
    Thank you,
    Very_sr

    Maybe one of these answers will work for you. I found these in Google with "wordpad windows 7 single space" (quotations included):
    *http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/how-do-i-get-wordpad-to-single-space-i-have-tried/d2fa34e0-4b4b-473d-8cf3-b42bf0c9e9b5?msgId=a1d56306-a092-4f13-9919-cb19de4ae936
    *http://smallbusiness.chron.com/set-line-spacing-wordpad-44510.html
    *The following suggestion requires changes to the Windows Registy. Perform these suggestion ONLY if you feel confident enough to alter the Registry. Making a mistake can damage your Windows installation and can, in extreme cases, make your computer un-bootable.
    **http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/how-to-retain-personal-font-settings-in-wordpad/35e3a1c6-9dbd-4a7d-b291-a931ac9ea5d6
    A WordPad (Windows 7/8) reference - http://www.7tutorials.com/how-work-new-wordpad

  • Replacing multiple spaces with a single space

    Hi friends,
    I have a string. It can have zero/one/multiple spaces. I want to make the multiple spaces to single space.
    Here are the cases:
    1. ' a b c d efg h' should be changed to 'a b c d e f g h'
    2. ' a b c d e f g h ' should be changed to 'a b c d e f g h'
    3. 'a b c d e f g h' should not be changed
    4. 'abcdefgh' should not be changed
    Both REPLACE and TRANSLATE do not help. I don't want to go for LOOP logic. Please help me to get it in SQL query.
    Thanks in advance!

    Hi,
    964559 wrote:
    Hi friends,
    I have a string. It can have zero/one/multiple spaces. I want to make the multiple spaces to single space.
    Here are the cases:
    1. ' a b c d efg h' should be changed to 'a b c d e f g h'One solution is to post your string on this site, and then copy it back again. (See below for a more serious solution .)
    This site is doing exactly what you want the function to do: it replaces multiple consecutive spaces with a single space. As a result, it's hard to see what you mean.
    To preserve spacing on this site, type these 6 characters
    \(small letters only, inside curly brackets) before and after each section where you want spacing preserved.
    2. ' a b c d e f g h ' should be changed to 'a b c d e f g h'
    3. 'a b c d e f g h' should not be changed
    4. 'abcdefgh' should not be changed
    Both REPLACE and TRANSLATE do not help. I don't want to go for LOOP logic. Please help me to get it in SQL query.
    Thanks in advance!Regular expressions make this easy:SELECT TRIM ( REGEXP_REPLACE ( str
    , ' +'
    ) AS compressed_str
    FROM table_x;
    You can use nested REPLACE calls to get the same results, but it's messy.
    Edited by: Frank Kulash on Feb 5, 2013 10:18 AM
    Added TRIM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to change quotation marks throughout document?

    Hello, so all my quotations in my document are like this
    “It’s a nasty thing to do”
    I want to change them to
    'It’s a nasty thing to do'
    Is there any easy way of doing this? I tried doing them separately but it always made them both the same direction...if that makes sense? So two 66s or 99s.
    Thanks
    Dan

    Find-and-change should work just fine, but there are a couple of special issues with quote marks.
    FIRST: If you put a straight single or double quote in FIND, it will match straight, curly open, and curly closed. (But only for its own 'kind', a single straight quote will never match a double curly one).
    SECOND: if you put a straight single or double quote in REPLACE, it will be replaced with a straight, curly open or curly closed according to the active RULES. Rule #1 is, of course, "Use Typographer's Quotes" -- if this is checked, they will be curly, otherwise they will be straight. Rule #2 is only for curlies: if there is a non-word character to the left, the quote will be "Open", otherwise it will be a "Close" one. Rule #3 is: the style of these quotes will be taken from the language of the text that it's applied to.
    THIRD: to override any of the above, use the Meta-characters for the various quotes. You can use them both in Find and in Change, and you can find the meta-characters in the Online help for your version of InDesign, and in the pop-down menus next to the Find and Change fields. Some that I regularly use:
    ^' in FIND will only match straight quotes, no curlies. Same for ^"
    ^[ will FIND only curly single opens, and in REPLACE will only insert curly single opens
    ^] same for curly single closes.
    In your example, you seem to change double quotes to single ones (why not simply say so? ), but you say they change to two 66s or 99s. Perhaps that's a language thing? In Finnish, for example, both open and close are 99s.

  • Double Click to Single Click

    Is there any way that i can change the property of double click to single click.
    For eg: In a sales order -> header -> texts -> txt type ( Form Header, Header Note1.. etc). Here to see the text of Header Note1 from Form Header we have to double click on Header Note1, rather than double clicking can we change it to single click.
    Thank You,
    Suresh

    I think this is not possible.
    Actually the function key for Double Click is <b>F2</b> and the function code is <b>PICK</b>.
    So, if you want to use any other function key instead of F2, we can assign the function code to that function key(say, for example F4, F5 etc), this possibility can be achieved.
    But changing double click to single click is not possible.
    Regards,
    Pavan

Maybe you are looking for

  • How give a data from one table to another table

    Oracle forms6i Hai All I had two table in table data base and from one table the data has to move to another table using forms The two tables are First table name temp_att from this the data has to move and the data are BARCODE BARDATE BARTIME Row_nu

  • Upgrading MR 10.1.0.5 ?

    We currently have installed Oracle AS (10.1.2.0.2) with Portal (10.1.4.0.0), SSO, OID, a Portal Repository and a MR (10.1.0.5). We wish to CPU patch these and will be patching to Oracle AS 10.1.2.2.3 to allow us to achieve this, is it possible to upg

  • [SOLVED] Allowing root ssh?

    Do you guys think it would be a good idea if I allowed root ssh on a system that only allows key authentication? I gave the root user a 4096 byte (or at least I think it was byte) long key, just because I want an even smaller chance of someone gettin

  • Several questions regarding aperture 1.5.2

    hi. I am a new mac user (just started using several days now), and apparently Aperture. One of the reason why I switched to Apple is Aperture and future CS3. In any rate, I have these questions if anyone can answer. First, my spec is as follows. Mac

  • Error opening printer?

    I get this error message upon startup: There was an error opening your printer. Printing functions will not be available until you have selected a printer and reopened any documents. I can however print pictures with window's photo printing wizard so