Please help, modify a regular preg_replace replace problem first thanks to master microlab2009, and xuzuning moderator, in the first post enthusiastic answer http://bbs.csdn.net/topics/390720868
========================================================== ============
I have used the following code to output the "number" in the article content as an image, which works very well, but there is a problem: some articles contain image tags, such
When you replace an image, replace the number in the image address with the image, which leads to an image display error:
Http://www.zzyycc.com/news/show-12058.html
Excuse me, how can I not replace the number in the tag?
Shan Tao Ren: supply is not urgent years ago, the price fell slightly, the current market Shan Tao Ren net goods 60-65 yuan.
Bugu fat: New products are coming to the market, prices are slippery, and the price for unified products is 7-RMB. as new products continue to go public, there is room for decline in the market outlook.
Snake bed: the supply of goods is moving smoothly, the price is strong, unified goods 20 yuan up and down, the net goods 22 yuan, the product inventory is small, pay attention to more businesses.
Cat Claw grass: the supply of goods is not good, the prices of household goods are slippery, about 92 yuan of unified goods, wild products are still priced, unified goods-yuan.
Raw land: the supply is moving smoothly, the price starts to stabilize, the market is mixed with goods 13-13.5 yuan, and the third-level goods are 15-16 yuan.
Huanglian: the supply is normal, the price is stable, and the total price is-93 yuan. as the supply is digested, the market outlook may continue to rise.
Banlangen: recent major goods are moving around in general, the price is stable, northeast goods 8.5-8.8 yuan, Gansu goods 9-yuan.
BA Pitian: the supply of goods is moving smoothly, the price is firm, and the current market of BA Piao meat is 45 yuan, a good choice of goods 53 yuan up and down.
Yu Jin: the supply of goods is not good, the price is exhausted, 9 into new unified goods 18-19 yuan, 20-22 yuan.
Turmeric: the supply of goods is moving smoothly, but the price is temporarily stable. the current market is 5.5-6 yuan, and the ginger slices are 7-yuan.
Platycodon: After the year, the supply of goods is good, the price is strong, the real estate unified goods 23 yuan up and down, not much attention to the business.
Chishao: there are few resources, there are not many goods, and the movement is still good. Currently, the yuan is 48-52 yuan for chishao, Inner Mongolia, and the yuan is 5-58 yuan for the film.
Chrysanthemum cake: the supply of goods is normal, the price is strong, Paju real estate chrysanthemum cake 40-42 yuan, chrysanthemum cake 50-55 yuan.
Xiang Fu: The supply of goods is normal, the price is stable, the market is 9.5 yuan up and down, the system piece is about 13.5 yuan.
Context; $ con = preg_replace ('/\ d/', ', $ con); echo $ con;?>
Reply to discussion (solution)
$ Con = <
Shan Tao Ren: supply is not urgent years ago, the price fell slightly, the current market Shan Tao Ren net goods 60-65 yuan.
Bugu fat: New products are coming to the market, prices are slippery, and the price for unified products is 7-RMB. as new products continue to go public, there is room for decline in the market outlook.
Snake bed: the supply of goods is moving smoothly, the price is strong, unified goods 20 yuan up and down, the net goods 22 yuan, the product inventory is small, pay attention to more businesses.
Cat Claw grass: the supply of goods is not good, the prices of household goods are slippery, about 92 yuan of unified goods, wild products are still priced, unified goods-yuan.
Raw land: the supply is moving smoothly, the price starts to stabilize, the market is mixed with goods 13-13.5 yuan, and the third-level goods are 15-16 yuan.
Huanglian: the supply is normal, the price is stable, and the total price is-93 yuan. as the supply is digested, the market outlook may continue to rise.
Banlangen: recent major goods are moving around in general, the price is stable, northeast goods 8.5-8.8 yuan, Gansu goods 9-yuan.
BA Pitian: the supply of goods is moving smoothly, the price is firm, and the current market of BA Piao meat is 45 yuan, a good choice of goods 53 yuan up and down.
Yu Jin: the supply of goods is not good, the price is exhausted, 9 into new unified goods 18-19 yuan, 20-22 yuan.
Turmeric: the supply of goods is moving smoothly, but the price is temporarily stable. the current market is 5.5-6 yuan, and the ginger slices are 7-yuan.
Platycodon: After the year, the supply of goods is good, the price is strong, the real estate unified goods 23 yuan up and down, not much attention to the business.
Chishao: there are few resources, there are not many goods, and the movement is still good. Currently, the yuan is 48-52 yuan for chishao, Inner Mongolia, and the yuan is 5-58 yuan for the film.
Chrysanthemum cake: the supply of goods is normal, the price is strong, Paju real estate chrysanthemum cake 40-42 yuan, chrysanthemum cake 50-55 yuan.
Xiang Fu: The supply of goods is normal, the price is stable, the market is 9.5 yuan up and down, the system piece is about 13.5 yuan.
Context; $ con = preg_replace ('/(? = [^>] * (? = <(?!>) | $) \ D/', '', $ con); echo $ con;
Shan Yi meat: the supply of goods is not as good as the early stage of production, the price is exhausted, unified goods-yuan, high-quality goods selection yuan.
Shan Tao Ren: a few years ago, the price fell slightly, the current market Shan Tao Ren net goods-yuan.
Bugu fat: new goods are coming to the market, prices are slippery, unified goods-. Yuan, as new goods continue to go public, there is room for decline in the market outlook.
Snake bed: the supply of goods is moving smoothly, the price is strong, the unified goods yuan up and down, the net goods yuan, the product inventory is small, pay attention to more businesses.
Cat Claw grass: the supply of goods is not good, the prices of household goods are slippery, the prices of goods are about yuan, the prices of wild products are still strong, the prices of goods-yuan.
Raw land: the supply is moving smoothly, the price starts to stabilize, and the market is mixed with goods-. Yuan, and third-level goods-yuan.
Huanglian: the supply of goods is normal, the price is stable, and the price is stable. as the supply of goods is digested, the market may continue to rise.
Banlangen: recent major goods are moving around in general, the price is stable, the Northeast unified goods.-. Yuan, Gansu goods-. yuan.
BA Pitian: the supply of goods is moving smoothly, the price is firm, and the current market is BA Piao meat United goods yuan, a good selection of goods yuan up and down.
Yu Jin: the supply of goods is not good, the price is exhausted, 9 Cheng new unified goods-yuan, system Film-yuan.
Turmeric: The supply is moving smoothly, but the price is temporarily stable.-yuan, Ginger porn-. yuan.
Platycodon: After the year, the supply of goods is good, the price is strong, the real estate of the goods yuan up and down, not much attention to the business.
Chishao: there are few resources, and there are not many items available. it is still good to move around. Currently, Beijing, Inner Mongolia, chishao-yuan, tongfilm-yuan.
Chrysanthemum cake: the supply is normal, and the price is firm. Juhua cake of Zhuzhou real estate-yuan, and chrysanthemum cake-yuan.
Xiang Fu: The supply is normal, the price is stable, the market is Mao Fu. yuan up and down, the system piece is in. yuan.
Thank you !!!!!!!!