Jump to content
UBot Underground

Recommended Posts

Hi
 
I have this HMTL code below, please see https://regex101.com/r/u63Ri6/3 for the full code and my regex:
 

------------start

<tr><td colspan=2>
<b>Article:</b><br>
<textarea rows=30 cols=120 style='width:100%;'>The Different Meanings Of Your Check Engine Light With An Auto Services Lincoln Park Chicago

The lights on your vehicle dash are extremely important.

------------end

 

What I try to catch is "The Different Meanings Of Your Check Engine Light With An Auto Services Lincoln Park Chicago".

 

When I try to use the regex101 code I made there within Ubot I get nothing back.

 

Any help appreciated!

 

Link to post
Share on other sites

They have different flavors on the left.

I used Python and it worked.

I believe it is the same as .Net which is what ubot uses, I have not had any issues thus far.

set(#html,"<table width=90%>
<tr><td colspan=2>
<b>Text Resource Box:</b><br>
<textarea rows=15 cols=120 style=\'width:100%;\'>When you are looking for information about auto repair Lincoln Park residents should visit our web pages online today. More details are available at http://www.bucarobrothersautocare.com/ now.</textarea>
</td></tr>

<tr><td colspan=2>
<b>HTML Resource Box:</b><br>
<textarea rows=15 cols=120 style=\'width:100%;\'>When you are looking for information about <a href=\"http://www.bucarobrothersautocare.com/\">auto repair</a> Lincoln Park residents should visit our web pages online today. More details are available at http://www.bucarobrothersautocare.com/ now.
</textarea>

<br>
<a href=\'#\' onclick=\'$(\"#old_box\").toggle(); return false;\'>Show Web Version</a><br>
<span id=\'old_box\' style=\'display: none;\'>When you are looking for information about <a href=\"http://www.bucarobrothersautocare.com/\">auto repair</a> Lincoln Park residents should visit our web pages online today. More details are available at http://www.bucarobrothersautocare.com/ now.<br><br></span>

</td></tr>

<tr><td colspan=2>
<b>Article:</b><br>
<textarea rows=30 cols=120 style=\'width:100%;\'>The Different Meanings Of Your Check Engine Light With An Auto Services Lincoln Park Chicago

The lights on your vehicle dash are extremely important. It details essential information regarding the health of your vehicle. Most cars built over the last decade or so provide more preventative measures, so even if a light goes off on the dash, you don\'t need to drop everything and instantly head out to an auto services garage. Instead, you need to have a basic understanding as to what the light you are seeing on your dash means and what to do about it.
","Global")
alert($find regular expression(#html,"(?<=<b>Article:<\\/b><br>\\n<textarea rows=30 cols=120 style=\'width:100%;\'>).*"))

Probably an easier way of doing this but not sure what you are doing.

Have you tried $scrape attribute?

Regards,
CD

Link to post
Share on other sites

found the issue. For some reason I must replace

 

rows=30 with rows=\"30\"

 

and

 

style='width:100%;' with style=\"width:100%;\"

 

So the final regex code in Ubot that works is

 

(?<=<b>Article:</b><br>\n<textarea rows=\"30\" cols=\"120\" style=\"width:100%;\">).*

 

Why is that?

Link to post
Share on other sites

found the issue. For some reason I must replace

 

rows=30 with rows=\"30\"

 

and

 

style='width:100%;' with style=\"width:100%;\"

 

So the final regex code in Ubot that works is

 

(?<=<b>Article:</b><br>\n<textarea rows=\"30\" cols=\"120\" style=\"width:100%;\">).*

 

Why is that?

 

Generally in HTML attribute values are surrounded by quotes, I'm not sure why they are not in your original post but if you're scraping from a webpage they will probably have quotes like that.

  • Like 1
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...