Hi there, Im off to bed now - My FTP to my server is down - cant test...
I'll try more tomorow - hopefully FTP is up....
Without doing a foreach loop - Im thinking of doing a preg_replace on
multiple lines...
$value=preg_replace("/\n\s*\n*\s*\n\s*book/i", "\n\nbook", $value);
Basically, I have some words , then multiple spaces / blank lines -
then another line beginning with the word BOOK (& more text....)
Will the above work ? - Basically I only want ONE blank line - Not
multiple lines...
(without doing a foreach loop of course).....
and then - The next line - begins with the word CLUB (more text...) -
I want it to remove all the blank lines - & put the 'club' line - on
the next line -
(so BOOK is on one line, & CLUB is on the next line...
$value=preg_replace("/\n\s*\n*\s*\n\s*club/i", "\nclub", $value);
is there a better line than :- \n\s*\n*\s*\n
- to indicate two or more blank lines (which may or may not have
'spaces' in it..)
can be 2, 4, or 50 blank lines - is there a preg to represent " 2 or more" ?
--
G Stewart
Gmail invites - Hundreds available..
Gmail : [EMAIL PROTECTED]
NZ: [EMAIL PROTECTED]
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/