| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2000-10-25 19:06 UTC] john at vbulletin dot com
 <?
$wordwrap="100";
echo eregi_replace("([^\n\r \\./<>\"\\-]{$wordwrap})"," \\1 ","$1000");
// outputs $100 0
echo eregi_replace("([^\n\r \\./<>\"\\-]{".$wordwrap."})"," \\1 ","$1000");
//outputs $1000
?>
For output, see:
http://linux1371.dn.net/test.php
I'm not sure what else you need. I can provide most things.
PHP Info:
http://linux1371.dn.net/phpinfo.php
Thanks,
John
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
This is bcz of the special treatment that the "{$variable}" construct has in PHP. Here's how the statement looks by the time the regex parser gets ahold of it: ([^\n\r \\./<>\"\\-]100) Which is going to replace "$1000" with " $100 0", as you asked it to...