English 中文(简体)
试验性帮助应当真正简单[封闭]
原标题:Regex help, should be really simple [closed]
  • 时间:2011-11-17 20:06:49
  •  标签:
  • php
  • regex
$newHTML = str_replace("<tr><td>1-30 of 699 results.1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>", "", $newHTML);
            $newHTML = str_replace("<tr><td>31-60 of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>", "", $newHTML);
            $newHTML = str_replace("<tr><td>61-90 of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>","",$newHTML);
            $newHTML = str_replace("<tr><td>91-120 of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>","",$newHTML);
            $newHTML = str_replace("<tr><td>121-150 of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>","",$newHTML);

上面的法典是我没有做的事,因为我根本不理解。

**<tr><td>**121-150 **of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>**

上文以121-150为例,是<代码>新超文本中唯一固定数字。 其他扼杀似乎是多次发生的。 我怎么能抛弃这些景点? 页: 1

<tr><td>###-### of 699 results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>

如果有迹象,需要删除。

最佳回答

简单直截了当地将你的一套扼杀物转换为一种PHP经常表达。 这些考虑是:

位数为1位或1位以上,因此,位数以内。

<代码>>/代码>为垂直线,因此你可以代替每一垂直线。

因此,与规定的一套指示相对应的定期表述是:

<tr><td>d+-d+ of d+ results.First &Acirc;&middot; Prev &Acirc;&middot; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 &Acirc;&middot; Next &Acirc;&middot; Last</td></tr>
问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签