正则表达式? [英] Regular Expression?

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

问题描述

嗨...我想在下一页中匹配以下模式 http://results.vtu.ac.in/default.php...&submit=SUBMIT

i尝试了几个正则表达式..但是没用_

Hi... I want to match the below pattern in the following page http://results.vtu.ac.in/default.php...&submit=SUBMIT
i tried several regular expression.. but no use

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

取决于。这种模式的哪些元素是静态的。哪些部分是动态的?你对有效匹配和无效匹配有什么限制?
That depends. What elements of this "pattern" are static. Which parts are dynamic? and what are the restrictions you are placing on valid matches vs. invalid matches?


在编码字符串中,所有html都是静态的,只有标签之间的数据是动态的...即它改变了不同的USN(大学座位号),如1rn08cs006是我的.. :)


标签如< TR>< TD width =" 513">< B个< / TD>< / TR>< /表>< / TD>< / TR>是静态的......:)
In the coded string, all the html is static only the data between the tags is dynamic... that is it changes for different USN(University seat number) like 1rn08cs006 is mine.. :)

the tags like <TR><TD width="513"><B> </td></tr></table></TD></TR> are static... :)


然后只需将链接作为静态部分抓取,其中一部分编码为动态。

Then just grab the link as a static portion with that one part encoded to be dynamic.

展开 | 选择 | Wrap | 行号


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

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