Jump to content

match string in html file


playwright

Recommended Posts

Depends how rigidly you can actually define the requirement. Given the examples you have it's hard to say as you don't specify an example input, but you would match the first part with the pattern.

 

abc\.php\?t=123

 

Depending on how the 'links' are listed in your page you could then use something like....

 

[^"]*
// or
\S*

 

... to match the rest of the query_string. Effectvely giving you a pattern such as...

 

#abc\.php\?t=123[^"]*#

ok i will be more specific..the code is this one:

 

<a class="paginationLink" href="showthread.php?t=123&page=2"

title="Display results">2</a>

 

I want to be able to use a regex or something else so as to grab all href like this one (and also showthread.php?t=123&page=3 and showthread.php?t=123) and then use file_get_contents() to grab contents from all these files.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.