x Hint: Register, if you want to hide ads.
x Did you like it? Well, then please consider making a donation :)

Length: 0b, Line: 1, Cursor: 0

RegexOptions

IsMatch=true


#ValueIndexLengthGroupsCaptures
0<link rel="shortcut icon" href="//cdn.sstatic.net/stackoverflow/img/favicon.ico?v=6cd6089ee7f6">096Skip Navigation Links.Skip Navigation Links.
1<link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png?v=41f6e13ade69">97118Skip Navigation Links.Skip Navigation Links.
2<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">216110Skip Navigation Links.Skip Navigation Links.
3<a href="//stackoverflow.com">33130Skip Navigation Links.Skip Navigation Links.
Count: 4, Time: 00:00:00

Share (without adding to database):

Source code

0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
//.NET Regex.Match Online Tester: www.systemtextregularexpressions.com

//Namespace
using System.Text.RegularExpressions;

//Regex Pattern
string pattern = @"<(a|link).*?href=(""|')(.+?)(""|').*?>";

//Regex example #1
Regex r = new Regex(@"<(a|link).*?href=(""|')(.+?)(""|').*?>");
Match m1 = r.Match("input text");
MatchCollection mc1 = r.Matches("input text");

//Regex example #2
Match m2 = Regex.Match("input text", @"<(a|link).*?href=(""|')(.+?)(""|').*?>");
MatchCollection mc2 = Regex.Matches("input text", @"<(a|link).*?href=(""|')(.+?)(""|').*?>");
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
'.NET Regex.Match Online Tester: www.systemtextregularexpressions.com

'Namespace
Imports System.Text.RegularExpressions

'Regex Pattern
Dim pattern As String = "<(a|link).*?href=(""|')(.+?)(""|').*?>"

'Regex example #1
Dim r As Regex = New Regex("<(a|link).*?href=(""|')(.+?)(""|').*?>")
Dim m1 As Match = r.Match("input text")
Dim mc As MatchCollection = r.Matches("input text")

'Regex example #2
Dim m2 As Match = Regex.Match("input text", "<(a|link).*?href=(""|')(.+?)(""|').*?>")
Dim mc2 As MatchCollection = Regex.Matches("input text", "<(a|link).*?href=(""|')(.+?)(""|').*?>")

Home     Match     Replace     Split     Help     Library     Contacts     netregex rss

Made by Koshevoy Dmitry [8Bytes],

© 2014-2017 Ukraine, Nikolaev.