English 中文(简体)
Regex html 标签
原标题:Regex html tags
  • 时间:2010-09-09 06:06:33
  •  标签:
  • regex
  • html

I m 试图在以下地方 figure:

String</td><td>[number 0-100]%</td><td>[number 0-100]%</td><td>String</td><td>String</td>

Also, some of these td tags may have style attributes at some point. I tried this:

String<.*>

返回

String</td>

而是试图

String<.*><.*>

无。 为什么如此?

问题回答

您或许会试图利用一种reg光来平流的超文本,因为lies madness

(.+)</td><td>(1?d?d)%</td><td>(1?d?d)%</td><td>(.+)</td><td>(.+)</td>

使用Character 类别,如<td[^>]*>><td> or <td category=“abc”>

如下:

(.+)(<[^>]+>){2}(1?d?d)%(<[^>]+>){2}(1?d?d)%(<[^>]+>){2}(.+)(<[^>]+>){2}(.+)<[^>]+>

http://jsfiddle.net/Ce48k/“rel=“nofollow noretinger”>here

EDIT:虽然这在大部分时间都会奏效,如果是“主人”的特性,但该校赢得了笔工作。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签