Replace only the first occurence of multiple whitespace with new line [closed]

Peehilsassime

New Member
\[quote\] Possible Duplicate:
Replace only first match using preg_replace \[/quote\]I have a string as follows:\[code\]a quick brown fox jumps over a lazy dog\[/code\]and I want the result to be\[code\]aquick brown fox jumps over a lazy dog\[/code\]Want to replace only the first occurrence of multiple(more than 1) whitespace with a newline, but leave the other multiple whitespaces after that untouched.How can I do that with preg_replace?Thanks
 
Back
Top