Hey guys!
I have been working on a Steam Account Checker for sale at HF and ran into a pickle when trying to get the Index number of a line in a string (Not as easy as I thought, I may have been trying to hard) But anyway, I found a way to find the date on a Steam Profile Page of when it was created and when you were first friends, if you have ever been Friends.
This was easier to implement and less lines of code were used, Margin of error is slightly greater although it's nothing to worry about.
Make sure to;
PHP Code:
Imports System.Text.RegularExpressions
I'm going to be using my profile and downloading the source code using a Web Client.
PHP Code:
Dim WC As New WebClient
Dim Profile As String = WC.DownloadString("http://steamcommunity.com/profiles/76561197999160354/")
Now that we have the source code of my profile, Let's get the date in which it was created using Regex.
This will get any Month, Date and Year on the webpage (Not including errors for dates prior to Steam's Launch or end of world Apocalypse etc.)
I know that it's a mouthful to type out, so here is the Reg experession on it's own to save you some time.
PHP Code:
"((?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Sept|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?))(\s+)((?:(?:[0-2]?\d{1})|(?:[3][01]{1})))(?![\d])(.)(\s+)((?:(?:[1]{1}\d{1}\d{1}\d{1})|(?:[2]{1}\d{3})))(?![\d])"
I hope that helps people!
Enjoy,
Milopeach.
"If you cannot explain something simply, then you do not understand it at all." - Albert Einstein
"The best way to predict the future is to invent it." - Alan Kay
"The best way to predict the future is to invent it." - Alan Kay