我不得不问这个问题感觉很傻,但我不能让这个来拯救我的生命......
什么有用
preg_replace( '/(<[^>]+) onmouseout=".*?"/i', '$1', preg_replace( '/(<[^>]+) onmouseover=".*?"/i', '$1', $strHtml ) )
如何将这两个preg_replace函数合并为一个(通过梳理两个正则表达式模式?
我的尝试清理(不起作用)
preg_replace( '/(<[^>]+) (onmouseover|onmouseout)=".*?"/i', '$1', $strHtml )
我希望此preg_replace()
函数从我的HTML字符串中删除所有onmouseover
AND onmouseout
属性.它似乎只删除了两个属性中的一个......我做错了什么?
No contract / No subscription / No monthy fee
CLICK HERE
1080p HDTV reception
32db high gain reception
Rotor let you change direction of the antenna to find best reception
to see HDTV channels available in your area.
** TV signal reception is immensely affected by the conditions such as antenna height, terrain, distance from broadcasting transmission antenna and output power of transmitter. Channels you can watch may vary depending on these conditions.
* Reception: VHF/UHF/FM
* Reception range: 120miles
* Built-in 360 degree motor rotor
* Wireless remote controller for rotor (included)
* Dual TV Outputs
* Easy Installation
* High Sensitivity Reception
* Built-in Super Low Noise Amplifier
* Power : AC15V 300mA
Kit contents
* One - HDTV Yagi antenna with built-in roter & amplifier
* One - Roter control box
* One - Remote for roter control box
* One - 40Ft coax cable
* One - 4Ft coax cable
* One - power supply for roter control box
https://regex101.com/
我永远无法弄清楚如何使用http://regexr.com/,所以我尝试了这个regex101.com网站,从那时起我一直很喜欢它.强烈建议任何面临类似问题的人(使用像我原来那样的剪切和粘贴正则表达式模式......).