Simple as fuck, I know. I made it as an example for some kid. It's a "Site Manager".
Gif:
[img]http://www.coding-forums.com/hf/imgs/LinkProgram_Outcome.gif[/img]
DL: http://www.coding-forums.com/hf/sources/...d.php?id=4
I also made this as an example and it's in the same project, what I've started to do is just add everything to one huge ass project called "Examples". Right now there are only 2 things that work (out of 3).
Gif:
[img]http://www.coding-forums.com/hf/imgs/LV_Update.gif[/img]
[img]http://www.coding-forums.com/hf/imgs/LV_Remove.gif[/img]
Thanks for any interest and I hope someone learns something! 🙂
Some l33t coding you got there... Get back on Auxilium SWG... Anyways, nice share.
What do you use to record the gifs?
Oct 15, 2012 08:30 PM
(This post was last modified: Oct 15, 2012 08:30 PM by SomeWhiteGuy.)
(Oct 15, 2012 08:23 PM)Plump Wrote: What do you use to record the gifs?
I use Camtasia Studio to record the GIF's, and also any videos that I happen to upload to YouTube.
I see, thanks a lot sir. :D
Nice share btw.
DO NOT DEAL WITH THIS MEMBER
I don't really know much about RegEx, but from what I got from that expression was that it gets anything that is A-z & 0-9 between the title tags.
What happens if someone uses a character like '-' or '&'?
Nice source, I can think of a project or two i have sitting around I could mod this for. Thanks for sharing :]
(Oct 15, 2012 08:35 PM)Banksу Wrote: I don't really know much about RegEx, but from what I got from that expression was that it gets anything that is A-z & 0-9 between the title tags.
What happens if someone uses a character like '-' or '&'?
You are correct, and I didn't really think about that.
Easy work-around:
Code (?<=\<title\>)[a-zA-Z0-9-&\|\s]*(?=\</title\>)
DO NOT DEAL WITH THIS MEMBER
(Oct 15, 2012 08:42 PM)SomeWhiteGuy Wrote: You are correct, and I didn't really think about that.
Easy work-around:
Code (?<=\<title\>)[a-zA-Z0-9-&\|\s]*(?=\</title\>)
Or you could do how I would have done it:
Code siteTitle = GetBetween(siteSource, "<title>", "</title>", 0)
Private String GetBetween(ByVal source As String, ByVal str1 As String, ByVal str2 As String, ByVal index As Integer)
Dim tmp As String = Split(source, str1)(index + 1)
Return Split(tmp, str2)(index)
End Function
That way it returns any string no matter what is in it. 😉
(Oct 15, 2012 09:13 PM)Banksу Wrote: Or you could do how I would have done it:
Code siteTitle = GetBetween(siteSource, "<title>", "</title>", 0)
Private String GetBetween(ByVal source As String, ByVal str1 As String, ByVal str2 As String, ByVal index As Integer)
Dim tmp As String = Split(source, str1)(index + 1)
Return Split(tmp, str2)(index)
End Function
That way it returns any string no matter what is in it. 😉
That works too. Thanks for the function! 🙂
I would have used <title>(.*)</title> that will match anything and since there is only one title tag its asll good :)
lensert.com is the new screenshot utility, try it out now!
OSX & WINDOWS
or you try this (?<=\<title\>)(.*)(?=\</title\>)
Thanks everyone for the compliments and improved RegEx patterns.
(Oct 16, 2012 06:07 AM)-SiR- Wrote: or you try this (?<=\<title\>)(.*)(?=\</title\>) Exactly, with making the match non-greedy and no reason to capture that title: (?<=\<title\>).*?(?=\</title\>)
Also, no need of using a loop:
[img]http://rapidimg.org/server/files/507dcedc9551dVGy9IO.png[/img]
siteTitle = regex.Match(siteSource).Value will work good which will return first matched value.
(Oct 16, 2012 08:48 AM)soft2050 Wrote: Exactly, with making the match non-greedy and no reason to capture that title: (?<=\<title\>).*?(?=\</title\>)
Also, no need of using a loop:
[img]http://rapidimg.org/server/files/507dcedc9551dVGy9IO.png[/img]
siteTitle = regex.Match(siteSource).Value will work good which will return first matched value.
You are correct. Considering there will only be one match. I'm just so used to doing that, lol. o_o
|