c# - How to parse links from the string -
i have string "go stack overflow http://stackoverflow.com" want parse link string using c#. wants output in following format. "go stack overflow <a href=http://stackoverflow.com target=_blank>http://stackoverflow.com</>
"
is possible in c#?
use regular expression pattern ^(https?://)?(([0-9a-z_!'().&=$%-]: )?[0-9a-z_!'().&=$%-]@)?(([0-9]{1,3}\.){3}[0-9]{1,3}|([0-9a-z_!'()-]\.)([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.[a-z]{2,6})(:[0-9]{1,4})?((/?)|(/[0-9a-z_!*'().;?:@&=$,%#-])/?)$
Comments
Post a Comment