Re: getting rid of multiple consecutive blanks ?
John Markley <[email protected]> Sat, 24 Oct 2009 10:11:01 -0400
| Newsgroups | gmane.comp.handhelds.palm.peditors |
|---|---|
| Message-ID | <[email protected]> |
Quoting Voytek Eymont <[email protected]>: > I sometimes need to grab stuff from a web page, end up with lots of bamf > as well as lots of blank spaces/lines > > what the way to get rid of multiple consecutive ' ' from the pasted text ? > Voytek Hi Voytek - Perhaps there is some quick, easy way that some of our IT gurus can proffer. The only thing I can think of is that it may be possible to at least partially do so with a pScript or two. Questions- 1) Do you refer to horizontal spaces (p32) and tabs (p9) as your example would suggest, or/and also vertical gaps i.e. linefeeds (p10) and carriage returns (p13)? 2) In some of your spacey web page capture text, put the cursor at the start of a segment of blank space and run the pScript below, which will tell you the character value of the character (including whitespaces) immediately to the right of the cursor. You will see 9, 10, 13, or 32 reported. Record the result. Then move the cursor once with the right 4-way button. If there is now another whitespace to the right, run the pScript again and record the result, and continue in this manner until the cursor reaches an alphanumeric character to its right. Then move the cursor to the next whitespace and repeat the process. Do this until you have sampled all the types of whitespaces that are bugging you, and report back the whitespace character values you recorded. {character value:: /e@ /&varSet@[$1,$$] /&varShow@[$1]} ~John ------------------------------------ Latest pedit/pToolSet/LapTopHack at http://www.osuweb.net/~pc/pca/pc_all.zip pedit/pToolSet/LapTopHack scripting info/resources at http://www.peditors.com Peditors Forum http://groups.yahoo.com/group/peditors Unsubscribe by writing to peditors-unsubscribe-hHKSG33Tihh4sT85+ipIM4ckdKdSAMto@public.gmane.org! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/peditors/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/peditors/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/