You need to extract usable URLs from some irregular addresses;
C # Regular Expression
Code String firsturl = "http://www.herosoft.com, http://www.heropc.com.cn /";
// Create a regular match
String zhengze = @ "([w *] +.) {2,} ([w *] + )";
Match m = Regex. Match (firsturl, zhengze );
Firsturl = "http: //" + m. Value;
HTTP is not set because HTPP is not added when some URLs are stored in the database;
Therefore, HTTP is not added for regular expressions. Add the code manually.
Parse the Regular Expression
([W *] +.) {2,} ([w *] +)
W is a character,
* Indicates that the number of occurrences is unlimited, 0, and unlimited.
+ Indicates that at least once appears, and there is no upper limit
. Match a "."
{2,} indicates that this expression must be repeated at least twice.
The following is similar, but "." is not added.
The result is: www.herosoft.com.
Add HTTP ://