Jump to content

Recommended Posts

im trying to use this code right here to crawl for some links

/example\.com\/(.*)/

but the problem is it is leaving out the "/" after .com. lets say the link format for example is example.com/435345/details.html

 

the code works fine and will grab that link but it grabs it as example.com435345/details.html

what can i do to make the "/" be there after .com?

can anyone help with this? Thanks

Link to comment
https://forums.phpfreaks.com/topic/190493-grabbing-link/
Share on other sites

I have 2 more problems i just ran into if someone could help me.

on this one im trying to grab "Hp" but there is a huge gap as you can see so what would i do to fill that white space gap and grab "Hp".

<div class="dk_first">

Hp<span>

 

here is what im trying.

"/dk\_first\"\>.*?(.*)\<\/span/"

 

 

 

in this example, the word "example" can be any line of text and that bit of code there is what i have to work with so how would i grab that 7.6 MB?

 

family2 c">info example (7.6 MB)</p>

 

i know this is wrong but here is what i have been messing with

"/family2 c\"\>info .?* \(([\d+\.]{0,12} [A-Za-z]{2})MB)<\/p\>/"

 

can anyone help me with any of these please? thanks.

Link to comment
https://forums.phpfreaks.com/topic/190493-grabbing-link/#findComment-1004819
Share on other sites

/dk\_first\"\>.*?(.*)\<\/span/m

 

/family2 c\"\>info .*? \(([\d+\.]{0,12} [A-Za-z]{2})MB)<\/p\>/

 

Try those

 

they both dont seem to work. this one /dk\_first\"\>.*?(.*)\<\/span/m will work if i backspace this text in the test html file to meet like so but with the way it is spaced it will not work. im not sure what to do.

<div class="dk_first">Hp<span>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/190493-grabbing-link/#findComment-1004839
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.