|
Post by Bit on Apr 26, 2017 22:44:42 GMT
<LOG>The chars This has been classified as an EASY challenge. This challenge is exclusive for RBX.Lua users!
Hey, I'm Has. Just going to casually put this challenge here, feel free to give it a shot. You are supposed to output to the console the exact title of this thread, without using hard-coded solutions OR typing any part of the title directly (As a string). (Example of a hard-coded solution: print("HasTEK_Novice_Challenge_I) Well, hello there.") That one is not valid. ) The best answer will be selected depending on the following: A) Not using deprecated members of any kind. B) Using the least amount of characters possible.
Good luck. </LOG>
|
|
|
Post by goulstem on Apr 27, 2017 15:56:47 GMT
Using HttpService along with some string patterns/manipulation got me dis.
local data = game:GetService("HttpService"):GetAsync("http://scripters.boards.net/thread/31",true); --Get HTML layout local bound = data:match([[%id="content".+</h1>]]); --Search for the content div local title = bound:match("%<h1>.+</h1>"); --Close in on the title
print(title:sub(5):reverse():sub(6):reverse()); --Remove the header syntax and print.
|
|
|
Post by Josh on Apr 27, 2017 16:04:07 GMT
Using HttpService along with some string patterns/manipulation got me dis. local data = game:GetService("HttpService"):GetAsync("http://scripters.boards.net/thread/31",true); --Get HTML layout local bound = data:match([[%id="content".+</h1>]]); --Search for the content div local title = bound:match("%<h1>.+</h1>"); --Close in on the title
print(title:sub(5):reverse():sub(6):reverse()); --Remove the header syntax and print. Looks good goulstem!
|
|