Quantcast
Channel: Active questions tagged linefeed+php - Stack Overflow
Viewing all articles
Browse latest Browse all 21

Match all instances of \r\n, except that occurring before the very end of the document [duplicate]

$
0
0

Using preg_replace, I need to define the regex PATTERN to match all instances of the newline sequence \r\n exactly, EXCEPT that occuring at the very end of the text.

preg_replace(PATTERN,'"\r\n"',$text)

How do I specify PATTERN in this case?


Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>