Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[Easy] Get any value from any website [Regex]

Arrh Regex the one thing that turns my brain to mush thanks for the easy to follow tutorial. 🙂
If you're just getting value between something such as this, Split would be faster compared to Regex. Regex isn't just about .*, if you're just gonna use .* everywhere then you don't really need to use regex.
(Jan 18, 2013 05:58 AM)Cairns Wrote:  This is kinda useless using both split and regex, it's best to use one or the other. Regex is a good bit faster if you know how to write proper patterns. In this case you should have just used split

This.

Regular split is usually faster performance-wise compared to Regex in most cases, sometimes the split just isn't enough though and we have to use Regex.
(Jan 18, 2013 06:40 AM)Cairns Wrote:  I have coded a bot in the past that has harvested up to 1000s of links per page. I tried splitting them each time and it was okay the speed. I used regex to test its speed and found that regex ran much better. But I suppose it can change in most cases

That's because you had to call the Split method multiple times, with Regex you just have to call the Matches method once.
Thank you, searched very long, suddenly found it :D
I am getting the error that Match and MatchCollection is not defined, do i need to import System.Text.RegularExpressions? Thanks
Split() is always a better solution, especially with HTML.
Really nice concept..very creative
~Her0niC


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by SoldiercrimesJan 14, 2018 01:24 PM 16 481 Jan 14, 2018 01:24 PM
Last Post: Sn0wX
[.NET] by LouisAug 8, 2017 01:35 PM 3 183 Aug 8, 2017 01:35 PM
Last Post: SIM-3327349
[.NET] by polas6Apr 25, 2014 11:10 AM 9 189 Apr 25, 2014 11:10 AM
Last Post: Moen