homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

Removing whitespaces

10+ Year Member

Msg#: 8630 posted 4:12 pm on Sep 4, 2004 (gmt 0)

does anyone know if it is possible to remove all white spaces in my html code using DW 7.
For some reason when a client sends me their latest page updates it has tons of needless whitespace and the page has 600 lines of html which should normally be about 350 without all the spaces.
Or is their another program that can do this safely.




10+ Year Member

Msg#: 8630 posted 3:00 am on Sep 7, 2004 (gmt 0)

I've had a similar problem. In my case I wanted to replace period single whitepace (ie. ". ") with period double white space (ie. ".  ").

DW seems to ignore the whitespace completely in the "from" string (eg. changing 1.00 to "1.  00"!)

I don't know if DW supports regex - but I realised that it was just as easy for me to do the replace with Notepad before I started off on that path.

If the files are too big maybe try Wordpad or Word (or whatever editor you want really).

Word's pretty good at that sort of stuff - you can replace paragraph marks etc too (look at special characters in the help). So, for example replacing " ^p" with "^p" replaces the whitespace at the end of each line only. Run it repeatedly and all trailing whitespace is gone (but then I think they may have a macro do that - you get my drift anyway).


WebmasterWorld Senior Member 10+ Year Member

Msg#: 8630 posted 3:38 am on Sep 7, 2004 (gmt 0)

Commands > Apply source formatting

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved