I'm having trouble stripping this piece of HTML:
title="External Link" alt="External Link"/></h5>
                </a>
                This text is needed without the spaces..
            </div>
Here is the general method I attempted:
$array = array();
preg_match( '/<\/h5>(.*?)               
            /si', $data, $array ) ;
I just can't seem to crack it.
Any help would be appreciated,
Thanks!
开发者_运维问答P.s The text may also contain html tags itself, such as <em> or <strong>
This should work.
preg_match('#</h5>\s*</a>\s*(\w.+)\s*</div>#Uis', $data, $array);
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论