php - trying to adjust regex to remove new lines -


hi looking adjust regex:

/\[quote\](.+?)\[\/quote\]\r\n/is 

to ignore new lines (basically want quote system remove new lines after quote bbcode stop there being double space after quoting.

currently i'm doing replace:

$replace = "<div class=\"quote\"><span class=\"strong\">quote</span><br />$1</div>"; 

so directly removes new line, breaks if quote code last thing on page , no new line after it.

figured out simple way:

$body = str_replace("[/quote]\r\n", '[/quote]', $body); 

just remove them before it's checked in text. simple solution , no fuss.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -