How can I match comments in page source that start in symbols "//" but skip urls that also have "//" like " https://test.test.test/testing "?
My code right now is:
Regex regex = new Regex(@"\/\/(.*?$)", RegexOptions.Multiline);
MatchCollection matchCollection1 = regex.Matches(pageSource);
string allMatches = string.Join(";", from Match match1 in matchCollection1 select match1.Groups[1].Value);
add not present of ':' symbol and set multi line option
[^:]\/\/(.*?$)/gm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.