I have a REGEX that is very hungry. I need to grab onion URL's inside page source. However, my regex gets the .onion sites with no issue. It also gets some of the .onion/more_stuff as well. But unfortunately it grabs entire lines like .onion/stuff" </a.... etc etc. Here's what I'm working with.
I also would like http or https but when I do [s]* means 0 or more times right? How can I say 0 or 1? Here is how the regex is getting setup just in case I am doing something that can be slightly simplified.Code:"/https:\/\/[^\/]*\.onion\//"
Code:string regex_onionurl = "/https:\/\/[^\/]*\.onion\//"; regex onionSearch(regex_onionurl, regex_constants::icase); return regex_search(string_to_search_through ,onionSearch);