在html中查找隐藏字段的正则表达式 [英] Regular Expression to find hidden fields in html

查看:20
本文介绍了在html中查找隐藏字段的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个正则表达式来查找隐藏在 html 输出中的所有输入字段.有人知道这样做的表达方式吗?

I am looking for a regular expression to find all input fields of type hidden in html output. Anyone know an expression to do such?

推荐答案

我同意 Radomir 建议的链接是正确的,HTML 不应该用正则表达式解析.但是,我同意从它们一起使用中无法收集到任何有意义的信息.随之而来的咆哮完全适得其反.

I agree that the link Radomir suggest is correct that HTML should not be parsed with regular expressions. However, I do not agree that nothing meaningful can be gleaned from their use together. And the ensuing rant is totally counter-productive.

更正罗伯特的正则表达式:

To correct Robert's RegEx:

<([^<]*)type=('|")hidden('|")>[^<]*(/>|)

这篇关于在html中查找隐藏字段的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆