|
Posted by Tyno Gendo on 04/07/07 19:49
ZeldorBlat wrote:
> On Apr 7, 12:27 pm, Tyno Gendo <u...@example.com> wrote:
[snip]
> Why does everyone insist upon using regex's to do simple find/replace
> operations?
>
> str_replace("\n", " ", $someString);
>
Yes, you can also do str_replace as you suggest, its up to personal
preference really. Me personally, I've been seeing regex in projects at
work until they come out of my ears so regex is no problem, but
admittedly they were for much more complex matching and replacing ;-)
[Back to original message]
|