求一正则表达式,找到每一个<input xxxxxxxxxx /> 我下面这个表达式怎么不行呢?

String html = "<input title='11' align='left' hidden='0' style='text-align: left' name='DATA_10' type='text' /> <input title='222' align='left' hidden='0' style='text-align: left' name='DATA_11' type='text' /> ";
Pattern p = Pattern.compile("<input.*/>");
Matcher m = p.matcher(html);
while(m.find()) {
System.out.println(m.group());
}

这样写一下试试 可以的话给俺 分哈
(?=<input).*?(?<=/>)
温馨提示:内容为网友见解,仅供参考
第1个回答  2011-03-19
<input\s+[^>]*\s*/>
相似回答
大家正在搜