regex - VB6 String Contains URL using regular expressions -


I have to write the code which will read a string and if there is any website to remove any HTML tags Address includes this The string currently looks like:

The string that causes the problem This is a test string to show you what the problem is www.stackoverflow. Com

Any part of the web address will be included in:

. Www, http: //, https: //,

string output

along with com, .ca, etc. This is a test string to show you What is the problem (extra space here) www.stackoverflow.com

The code below which I have tried to work I have created a boolean flag and if it is true then I I want to make another argument that I have not written yet

  RegExp set Rex = New Reggex DIR urlFlag Boolean rex.Pattern = "(http: https) in the form: ([\ w-] + \.) + [\ W-] + (/ [\ w- ./?%&=]*]? " If rex.Test (str_Temp) then urlFlag = True else urlFlag = False End then  

output is always returning false meaning, meaning that the pattern is not working. any suggestion?

I have gone with a difference approach to the website's address only www., Http: //, And starts with https: //. I have created an array and I loop through the array and if the value of the index is in str_temp then replace the text and work it


Comments

Popular posts from this blog

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

c# - WPF Expander overlay used in ItemsControl -

class - Kivy: how to instantiate a dynamic classes in python -