`$newHTML = str_replace("<tr><td>1-30 of 699 results.1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>", "", $newHTML); $newHTML = str_replace("<tr><td>31-60 of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>", "", $newHTML); $newHTML = str_replace("<tr><td>61-90 of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>","",$newHTML); $newHTML = str_replace("<tr><td>91-120 of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>","",$newHTML); $newHTML = str_replace("<tr><td>121-150 of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>","",$newHTML); `

The code above is me doing it without regex because I simply do not understand regex.

`**<tr><td>**121-150 **of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr>** `

Using above as an example, 121-150 are the only numbers that aren't constant in `$newHTML`

. The rest of the string appears numerous times. How can I wildcard those spots? ie.

`<tr><td>###-### of 699 results.First Â· Prev Â· 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8-15 Â· Next Â· Last</td></tr> `

Where the number signs are possible numbers that need to be removed.

--------------Solutions-------------

It's pretty straightforward to convert your set of strings to a PHP regular expression. The considerations are:

`\d+`

stands for 1 or more digits, so you'll use that in place of each number.

`\|`

stands for a vertical line, so you'll use that in place of each vertical line.

Consequently, a regular expression which will match the given set of strings is:

`<tr><td>\d+-\d+ of \d+ results.First Â· Prev Â· 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8-15 Â· Next Â· Last</td></tr>`