PHP Regexp problem...
        Posted  
        
            by 
                Crazy
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Crazy
        
        
        
        Published on 2010-12-26T00:17:59Z
        Indexed on 
            2010/12/26
            1:54 UTC
        
        
        Read the original article
        Hit count: 756
        
Hi!
I want to replace this line :
<img width="600" height="256" alt="javascript00" src="http://localhost/img/test.png" title="javascript00" class="aligncenter size-full wp-image-1973">
With this :
<p align="center"><img width="600" height="256" alt="javascript00" src="http://localhost/img/test.png" title="javascript00"></p>
By use a simple regexp. It consists to delete the image class and add a <p align="center"> around :)
Thanks for help! And merry christmas :)
© Stack Overflow or respective owner