NYCPHP Meetup

NYPHP.org

[nycphp-talk] regex for removing all newlines, line feeds

William Briggs wib2004 at med.cornell.edu
Tue Oct 12 15:38:20 EDT 2004


I'm looking for a regular expression that matches all newlines, tabs, 
and line feeds.  The only one I've got so far is '/[[:space:]]/' which 
works, but also removes the spaces which I want to keep.

I know '\r' and '\n' are the right seed but I can't seem to get them to 
work through the string (which make contain many newlines and line feeds).

William Briggs
Assistant Professor, Division of General Internal Medicine
Weill Medical College of Cornell University
525 East 68th St., Box #46
New York, NY 10021
Tel: 212-746-1684; Fax: 212-746-8965



More information about the talk mailing list