我正在使用这个正则表达式
<a [^>]*href[ ]*=[ ]*\"|'[^>]\"|'[^>]*>
在示例字符串中搜索:
idhasidhioashdoihas <a onclick=alert('blablabla') href='www.hello.com'
onclick=alert('blablabla') > asdfsgdufisdugfusdg
它应该匹配
<a onclick=alert('blablabla') href='www.hello.com'onclick=alert('blablabla') >
但它只匹配
'blablabla') href='www.hello.com' onclick=alert('blablabla') >
知道问题出在哪里吗?