Reply to Regexp to force line break/word wrap in long words

Your name:

Reply:


Posted by Ciaran on 12/03/07 16:33

Hi Can someone please give me a hand adapting this expression? I need
it to add a space into all words longer than 14 characters that are
not contained within [square brackets]

$result = preg_replace("/([^\s]{14})/","$1 ",$result);

It currently adds a space into all words that are longer than 14
characters but this is breaking another function I'm using which
extracts urls and other info from inside square brackets.

Thanks a lot!
Ciarán

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация