[] Php regular expression to replace the music address and image address

Source: Internet
Author: User
Tags preg
[Online and so on] php regular replacement music address and picture address ask you big man php regular replacement music address and picture address such as music address http://sdsds.com/sdds/def/das.mp3 http://sdse22s.com/s22dds/ [online, etc.] php regular replacement music address and picture address
Ask you to replace the music address and image address with regular expressions in php.

Such as music address http://sdsds.com/sdds/def/das.mp3
Http://sdse22s.com/s22dds/d2ef/da333s.wma
Http: // sdsds. c55om/sdd44s/de33f/d2222s.wav

For example, image address http://gggfefgg.com/da3s/ddderv.jpg
Http://saeggg.com/d3as/dddswe.gif
Http://ggbgg.com/da2s/dd86.png

Now I read a piece of content from the database. how can I match these images with music and replace them with others?

------ Solution --------------------
PHP code
[User: root Time: 09: 37: 50 Path:/home/liangdong/php] $ php preg. php this is the image [User: root Time: 09: 37: 51 Path:/home/liangdong/php] $ cat preg. php

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.