To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 2248
2247  |  2249
Subject: 
Re: Strip surplus white space with Perl
Newsgroups: 
lugnet.off-topic.geek
Date: 
Sun, 29 Oct 2000 21:39:04 GMT
Viewed: 
122 times
  
In lugnet.off-topic.geek, Todd Lehman writes:
   $string =~ s/([\009\040\015\012])\1+/$1/g;

s/009/011/

oops :)

--Todd



Message is in Reply To:
  Re: Strip surplus white space with Perl
 
(...) Ahh, but that *is* what he asked for. Fredrik said, "If two consecutive characters are <SPACE> and <RET>, for example, it doesn't matter to me which one is preserved and which one is chopped off." (...) My goodness. I suppose you could do it (...) (24 years ago, 29-Oct-00, to lugnet.off-topic.geek)

10 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR