How to use PHP to regularly extract the address of a picture in markdown text

needs to match the addresses of all the pictures in the markdown text, and then output all
the following .md contents:

content
! [description] ( http://baidu.com/images/1.jpg)
content
! [description] ( https://baidu.com/images/2.jpg)
content
! [description] (/ upload/images/1.jpg)
content

the required results are:
http://baidu.com/images/1.jpg
https://baidu.com/images/2.jpg
/upload/images/1.jpg

Thank you, boss! Thank you, boss! Ask for help ~

Php
Jun.19,2022

not tested.


$partnner = '/\]\((.*?)\)/';
preg_match_all($partnner, $content, $match);

resolved, as above.

Menu