develooper Front page | perl.beginners | Postings from March 2002

Re: help me with a better backstepper?

Thread Previous | Thread Next
Jeff 'japhy' Pinyan
March 6, 2002 11:30
Re: help me with a better backstepper?
Message ID:
On Mar 6, M z said:

>I've written a little program to analyze lines that
>are longer than 70 characters, and if so, break at
>position 70 (if it is whitespace), if not whitespace
>(i.e. is in the middle of a word) it steps back to the
>first whitespace and breaks there.


That says "match between 1 and 70 characters (as many possible) and then a
piece of whitespace" and replace it with the same text, except convert the
whitespace into a newline.  And the /g modifier says "do it for all

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About