Jump to content
UBot Underground

Is it possible to include wildcard in the match?


Recommended Posts

Hi guys, I have encountered a problem with a wildcard.

 

Basically, I wish to match content between an <a></a> tag.

 

The problem is that I need to add a wildcard when matching the tag.

 

<h3><a class="name" href="/user/id=31266009&authToken=TRVU&locale=en_US&srchid=4852501813&srchindex=1">Name i want to scrape</a>

 

eg

 

 

(?<=</h3><a class="name" href="WILDCARDGOESHERE">)(.?*)(?=</a>)

 

Is this possible? I tried inserting [a-zA-Z0-9\t\n .\/<>?;:"'`,!@#$%^&*()\[\]{}_+=|\\-] where WILDCARDGOESHERE exists, however this did not work

Link to post
Share on other sites

Hi Blumi, I appreciate your help,

 

Not sure if I am implementing it incorrectly but it did not seem to work on my end? Basically, I need to locate the h3 tag, and a tag, but ignore anything in between the href as this differs from link to link, then scrape the content between the A tag

Link to post
Share on other sites

Thanks Anonym, unfortunately in this case scrape attribute is not going to work as it was pulling out attributes that were irrelevant, i used scrape attribute to isolate the code above and need to regex it to refine it further.

 

The other alternative i thought was to regex replace the entire <a*> tag.and then run another regex but this is probably not the most ideal way to do it

Link to post
Share on other sites

Can you pls show the site so that I can have a look at it?

(if you are "afraid" of showing it in the public, then PM me. By the way, I am one of a few here who doesn't sell bots to small business owners or regular people. I primarily use it to automate my workday)

Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...