using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"&(?:(?<name>[a-zA-Z][a-zA-Z\d]+)|\#(?:(?<dec>\d+)|(?<hex>x[\da-fA-F]+)));";
string input = @"http://www.html-entities.org/
Encode & decode HTML entities Convert special characters to HTML entities
homeprint reference
ingnore HTML tags
""
"
"
quotation mark
'
'
'
apostrophe
&
&
&
ampersand
<
<
<
less-than
>
>
>
greater-than
 
non-breaking space
¡
¡
¡
inverted exclamation mark
¢
¢
¢
cent
£
£
£
pound
¤
¤
¤
currency
¥
¥
¥
yen
¦
¦
¦
broken vertical bar
§
§
§
section
¨
¨
¨
spacing diaeresis
©
©
©
copyright
ª
ª
ª
feminine ordinal indicator
«
«
«
angle quotation mark (left)
¬
¬
¬
negation
­
­
soft hyphen
®
®
®
registered trademark
¯
¯
¯
spacing macron
°
°
°
degree
±
±
±
plus-or-minus
²
²
²
superscript 2
³
³
³
superscript 3
´
´
´
spacing acute
µ
µ
µ
micro
¶
¶
¶
paragraph
·
·
·
middle dot
¸
¸
¸
spacing cedilla
¹
¹
¹
superscript 1
º
º
º
masculine ordinal indicator
»
»
»
angle quotation mark (right)
¼
¼
¼
fraction 1/4
½
½
½
fraction 1/2
¾
¾
¾
fraction 3/4
¿
¿
¿
inverted question mark
×
×
×
multiplication
÷
÷
÷
division
À
À
À
capital a, grave accent
Á
Á
Á
capital a, acute accent
Â
Â
Â
capital a, circumflex accent
Ã
Ã
Ã
capital a, tilde
Ä
Ä
Ä
capital a, umlaut mark
Å
Å
Å
capital a, ring
Æ
Æ
Æ
capital ae
Ç
Ç
Ç
capital c, cedilla
È
È
È
capital e, grave accent
É
É
É
capital e, acute accent
Ê
Ê
Ê
capital e, circumflex accent
Ë
Ë
Ë
capital e, umlaut mark
Ì
Ì
Ì
capital i, grave accent
Í
Í
Í
capital i, acute accent
Î
Î
Î
capital i, circumflex accent
Ï
Ï
Ï
capital i, umlaut mark
Ð
Ð
Ð
capital eth, Icelandic
Ñ
Ñ
Ñ
capital n, tilde
Ò
Ò
Ò
capital o, grave accent
Ó
Ó
Ó
capital o, acute accent
Ô
Ô
Ô
capital o, circumflex accent
Õ
Õ
Õ
capital o, tilde
Ö
Ö
Ö
capital o, umlaut mark
Ø
Ø
Ø
capital o, slash
Ù
Ù
Ù
capital u, grave accent
Ú
Ú
Ú
capital u, acute accent
Û
Û
Û
capital u, circumflex accent
Ü
Ü
Ü
capital u, umlaut mark
Ý
Ý
Ý
capital y, acute accent
Þ
Þ
Þ
capital THORN, Icelandic
ß
ß
ß
small sharp s, German
à
à
à
small a, grave accent
á
á
á
small a, acute accent
â
â
â
small a, circumflex accent
ã
ã
ã
small a, tilde
ä
ä
ä
small a, umlaut mark
å
å
å
small a, ring
æ
æ
æ
small ae
ç
ç
ç
small c, cedilla
è
è
è
small e, grave accent
é
é
é
small e, acute accent
ê
ê
ê
small e, circumflex accent
ë
ë
ë
small e, umlaut mark
ì
ì
ì
small i, grave accent
í
í
í
small i, acute accent
î
î
î
small i, circumflex accent
ï
ï
ï
small i, umlaut mark
ð
ð
ð
small eth, Icelandic
ñ
ñ
ñ
small n, tilde
ò
ò
ò
small o, grave accent
ó
ó
ó
small o, acute accent
ô
ô
ô
small o, circumflex accent
õ
õ
õ
small o, tilde
ö
ö
ö
small o, umlaut mark
ø
ø
ø
small o, slash
ù
ù
ù
small u, grave accent
ú
ú
ú
small u, acute accent
û
û
û
small u, circumflex accent
ü
ü
ü
small u, umlaut mark
ý
ý
ý
small y, acute accent
þ
þ
þ
small thorn, Icelandic
ÿ
ÿ
ÿ
small y, umlaut mark
∀
∀
∀
for all
∂
∂
∂
part
∃
∃
∃
exists
∅
∅
∅
empty
∇
∇
∇
nabla
∈
∈
∈
isin
∉
∉
∉
notin
∋
∋
∋
ni
∏
∏
∏
prod
∑
∑
∑
sum
−
−
−
minus
∗
∗
∗
lowast
√
√
√
square root
∝
∝
∝
proportional to
∞
∞
∞
infinity
∠
∠
∠
angle
∧
∧
∧
and
∨
∨
∨
or
∩
∩
∩
cap
∪
∪
∪
cup
∫
∫
∫
integral
∴
∴
∴
therefore
∼
∼
∼
similar to
≅
≅
≅
congruent to
≈
≈
≈
almost equal
≠
≠
≠
not equal
≡
≡
≡
equivalent
≤
≤
≤
less or equal
≥
≥
≥
greater or equal
⊂
⊂
⊂
subset of
⊃
⊃
⊃
superset of
⊄
⊄
⊄
not subset of
⊆
⊆
⊆
subset or equal
⊇
⊇
⊇
superset or equal
⊕
⊕
⊕
circled plus
⊗
⊗
⊗
circled times
⊥
⊥
⊥
perpendicular
⋅
⋅
⋅
dot operator
Α
Α
Α
Alpha
Β
Β
Β
Beta
Γ
Γ
Γ
Gamma
Δ
Δ
Δ
Delta
Ε
Ε
Ε
Epsilon
Ζ
Ζ
Ζ
Zeta
Η
Η
Η
Eta
Θ
Θ
Θ
Theta
Ι
Ι
Ι
Iota
Κ
Κ
Κ
Kappa
Λ
Λ
Λ
Lambda
Μ
Μ
Μ
Mu
Ν
Ν
Ν
Nu
Ξ
Ξ
Ξ
Xi
Ο
Ο
Ο
Omicron
Π
Π
Π
Pi
Ρ
Ρ
Ρ
Rho
ς
Ï
ς
Sigmaf
Σ
Σ
Σ
Sigma
Τ
Τ
Τ
Tau
Υ
Υ
Υ
Upsilon
Φ
Φ
Φ
Phi
Χ
Χ
Χ
Chi
Ψ
Ψ
Ψ
Psi
Ω
Ω
Ω
Omega
α
α
α
alpha
β
β
β
beta
γ
γ
γ
gamma
δ
δ
δ
delta
ε
ε
ε
epsilon
ζ
ζ
ζ
zeta
η
η
η
eta
θ
θ
θ
theta
ι
ι
ι
iota
κ
κ
κ
kappa
λ
λ
λ
lambda
μ
μ
μ
mu
ν
ν
ν
nu
ξ
ξ
ξ
xi
ο
ο
ο
omicron
π
π
π
pi
ρ
ρ
ρ
rho
ς
ς
ς
sigmaf
σ
σ
σ
sigma
τ
τ
τ
tau
υ
υ
υ
upsilon
φ
φ
φ
phi
χ
χ
χ
chi
ψ
ψ
ψ
psi
ω
ω
ω
omega
ϑ
ϑ
ϑ
theta symbol
ϒ
ϒ
ϒ
upsilon symbol
ϖ
ϖ
ϖ
pi symbol
Œ
Œ
Œ
capital ligature OE
œ
œ
œ
small ligature oe
Š
Š
Š
capital S with caron
š
š
š
small S with caron
Ÿ
Ÿ
Ÿ
capital Y with diaeres
ƒ
ƒ
ƒ
f with hook
ˆ
ˆ
ˆ
modifier letter circumflex accent
˜
˜
˜
small tilde
 
 
en space
 
 
em space
 
 
thin space
‌
‌
zero width non-joiner
‍
‍
zero width joiner
‎
‎
left-to-right mark
‏
‏
right-to-left mark
–
–
–
en dash
—
—
—
em dash
‘
‘
‘
left single quotation mark
’
’
’
right single quotation mark
‚
‚
‚
single low-9 quotation mark
“
“
“
left double quotation mark
”
”
”
right double quotation mark
„
„
„
double low-9 quotation mark
†
†
†
dagger
‡
‡
‡
double dagger
•
•
•
bullet
…
…
…
horizontal ellipsis
‰
‰
‰
per mille
′
′
′
minutes
″
″
″
seconds
‹
‹
‹
single left angle quotation
›
›
›
single right angle quotation
‾
‾
‾
overline
€
€
€
euro
™
™ or
™
trademark
←
←
←
left arrow
↑
↑
↑
up arrow
→
→
→
right arrow
↓
↓
↓
down arrow
↔
↔
↔
left right arrow
↵
↵
↵
carriage return arrow
⌈
⌈
⌈
left ceiling
⌉
⌉
⌉
right ceiling
⌊
⌊
⌊
left floor
⌋
⌋
⌋
right floor
◊
◊
◊
lozenge
♠
♠
♠
spade
♣
♣
♣
club
♥
♥
♥
heart
♦
♦
♦
diamond
⁄
⁄
⁄
fraction slash
℘
℘
℘
script capital P = power set = Weierstrass p
ℑ
ℑ
ℑ
black-letter capital I = imaginary part
ℜ
ℜ
ℜ
black-letter capital R = real part symbol
ℵ
ℵ
ℵ
alef symbol = first transfinite cardinal
⇐
⇐
⇐
leftwards double arrow
⇑
⇑
⇑
upwards double arrow
⇒
⇒
⇒
rightwards double arrow
⇓
⇓
⇓
downwards double arrow
⇔
⇔
⇔
left right double arrow
⟨
〈
⟨
left-pointing angle bracket = bra
⟩
〉
⟩
right-pointing angle bracket = ket
A Character Entity Reference is an encoding of a character in several characters from a limited character set.
The name Character Entity Reference is used for document structuring technologies of the World Wide Web Consortium, such as HTML, XML and XHTML.
Encode & decode HTML entities Convert special characters to HTML entities
homeprint reference
ingnore HTML tags
""
"
"
quotation mark
'
'
'
apostrophe
&
&
&
ampersand
<
<
<
less-than
>
>
>
greater-than
 
non-breaking space
¡
¡
¡
inverted exclamation mark
¢
¢
¢
cent
£
£
£
pound
¤
¤
¤
currency
¥
¥
¥
yen
¦
¦
¦
broken vertical bar
§
§
§
section
¨
¨
¨
spacing diaeresis
©
©
©
copyright
ª
ª
ª
feminine ordinal indicator
«
«
«
angle quotation mark (left)
¬
¬
¬
negation
­
­
soft hyphen
®
®
®
registered trademark
¯
¯
¯
spacing macron
°
°
°
degree
±
±
±
plus-or-minus
²
²
²
superscript 2
³
³
³
superscript 3
´
´
´
spacing acute
µ
µ
µ
micro
¶
¶
¶
paragraph
·
·
·
middle dot
¸
¸
¸
spacing cedilla
¹
¹
¹
superscript 1
º
º
º
masculine ordinal indicator
»
»
»
angle quotation mark (right)
¼
¼
¼
fraction 1/4
½
½
½
fraction 1/2
¾
¾
¾
fraction 3/4
¿
¿
¿
inverted question mark
×
×
×
multiplication
÷
÷
÷
division
À
À
À
capital a, grave accent
Á
Á
Á
capital a, acute accent
Â
Â
Â
capital a, circumflex accent
Ã
Ã
Ã
capital a, tilde
Ä
Ä
Ä
capital a, umlaut mark
Å
Å
Å
capital a, ring
Æ
Æ
Æ
capital ae
Ç
Ç
Ç
capital c, cedilla
È
È
È
capital e, grave accent
É
É
É
capital e, acute accent
Ê
Ê
Ê
capital e, circumflex accent
Ë
Ë
Ë
capital e, umlaut mark
Ì
Ì
Ì
capital i, grave accent
Í
Í
Í
capital i, acute accent
Î
Î
Î
capital i, circumflex accent
Ï
Ï
Ï
capital i, umlaut mark
Ð
Ð
Ð
capital eth, Icelandic
Ñ
Ñ
Ñ
capital n, tilde
Ò
Ò
Ò
capital o, grave accent
Ó
Ó
Ó
capital o, acute accent
Ô
Ô
Ô
capital o, circumflex accent
Õ
Õ
Õ
capital o, tilde
Ö
Ö
Ö
capital o, umlaut mark
Ø
Ø
Ø
capital o, slash
Ù
Ù
Ù
capital u, grave accent
Ú
Ú
Ú
capital u, acute accent
Û
Û
Û
capital u, circumflex accent
Ü
Ü
Ü
capital u, umlaut mark
Ý
Ý
Ý
capital y, acute accent
Þ
Þ
Þ
capital THORN, Icelandic
ß
ß
ß
small sharp s, German
à
à
à
small a, grave accent
á
á
á
small a, acute accent
â
â
â
small a, circumflex accent
ã
ã
ã
small a, tilde
ä
ä
ä
small a, umlaut mark
å
å
å
small a, ring
æ
æ
æ
small ae
ç
ç
ç
small c, cedilla
è
è
è
small e, grave accent
é
é
é
small e, acute accent
ê
ê
ê
small e, circumflex accent
ë
ë
ë
small e, umlaut mark
ì
ì
ì
small i, grave accent
í
í
í
small i, acute accent
î
î
î
small i, circumflex accent
ï
ï
ï
small i, umlaut mark
ð
ð
ð
small eth, Icelandic
ñ
ñ
ñ
small n, tilde
ò
ò
ò
small o, grave accent
ó
ó
ó
small o, acute accent
ô
ô
ô
small o, circumflex accent
õ
õ
õ
small o, tilde
ö
ö
ö
small o, umlaut mark
ø
ø
ø
small o, slash
ù
ù
ù
small u, grave accent
ú
ú
ú
small u, acute accent
û
û
û
small u, circumflex accent
ü
ü
ü
small u, umlaut mark
ý
ý
ý
small y, acute accent
þ
þ
þ
small thorn, Icelandic
ÿ
ÿ
ÿ
small y, umlaut mark
∀
∀
∀
for all
∂
∂
∂
part
∃
∃
∃
exists
∅
∅
∅
empty
∇
∇
∇
nabla
∈
∈
∈
isin
∉
∉
∉
notin
∋
∋
∋
ni
∏
∏
∏
prod
∑
∑
∑
sum
−
−
−
minus
∗
∗
∗
lowast
√
√
√
square root
∝
∝
∝
proportional to
∞
∞
∞
infinity
∠
∠
∠
angle
∧
∧
∧
and
∨
∨
∨
or
∩
∩
∩
cap
∪
∪
∪
cup
∫
∫
∫
integral
∴
∴
∴
therefore
∼
∼
∼
similar to
≅
≅
≅
congruent to
≈
≈
≈
almost equal
≠
≠
≠
not equal
≡
≡
≡
equivalent
≤
≤
≤
less or equal
≥
≥
≥
greater or equal
⊂
⊂
⊂
subset of
⊃
⊃
⊃
superset of
⊄
⊄
⊄
not subset of
⊆
⊆
⊆
subset or equal
⊇
⊇
⊇
superset or equal
⊕
⊕
⊕
circled plus
⊗
⊗
⊗
circled times
⊥
⊥
⊥
perpendicular
⋅
⋅
⋅
dot operator
Α
Α
Α
Alpha
Β
Β
Β
Beta
Γ
Γ
Γ
Gamma
Δ
Δ
Δ
Delta
Ε
Ε
Ε
Epsilon
Ζ
Ζ
Ζ
Zeta
Η
Η
Η
Eta
Θ
Θ
Θ
Theta
Ι
Ι
Ι
Iota
Κ
Κ
Κ
Kappa
Λ
Λ
Λ
Lambda
Μ
Μ
Μ
Mu
Ν
Ν
Ν
Nu
Ξ
Ξ
Ξ
Xi
Ο
Ο
Ο
Omicron
Π
Π
Π
Pi
Ρ
Ρ
Ρ
Rho
ς
Ï
ς
Sigmaf
Σ
Σ
Σ
Sigma
Τ
Τ
Τ
Tau
Υ
Υ
Υ
Upsilon
Φ
Φ
Φ
Phi
Χ
Χ
Χ
Chi
Ψ
Ψ
Ψ
Psi
Ω
Ω
Ω
Omega
α
α
α
alpha
β
β
β
beta
γ
γ
γ
gamma
δ
δ
δ
delta
ε
ε
ε
epsilon
ζ
ζ
ζ
zeta
η
η
η
eta
θ
θ
θ
theta
ι
ι
ι
iota
κ
κ
κ
kappa
λ
λ
λ
lambda
μ
μ
μ
mu
ν
ν
ν
nu
ξ
ξ
ξ
xi
ο
ο
ο
omicron
π
π
π
pi
ρ
ρ
ρ
rho
ς
ς
ς
sigmaf
σ
σ
σ
sigma
τ
τ
τ
tau
υ
υ
υ
upsilon
φ
φ
φ
phi
χ
χ
χ
chi
ψ
ψ
ψ
psi
ω
ω
ω
omega
ϑ
ϑ
ϑ
theta symbol
ϒ
ϒ
ϒ
upsilon symbol
ϖ
ϖ
ϖ
pi symbol
Œ
Œ
Œ
capital ligature OE
œ
œ
œ
small ligature oe
Š
Š
Š
capital S with caron
š
š
š
small S with caron
Ÿ
Ÿ
Ÿ
capital Y with diaeres
ƒ
ƒ
ƒ
f with hook
ˆ
ˆ
ˆ
modifier letter circumflex accent
˜
˜
˜
small tilde
 
 
en space
 
 
em space
 
 
thin space
‌
‌
zero width non-joiner
‍
‍
zero width joiner
‎
‎
left-to-right mark
‏
‏
right-to-left mark
–
–
–
en dash
—
—
—
em dash
‘
‘
‘
left single quotation mark
’
’
’
right single quotation mark
‚
‚
‚
single low-9 quotation mark
“
“
“
left double quotation mark
”
”
”
right double quotation mark
„
„
„
double low-9 quotation mark
†
†
†
dagger
‡
‡
‡
double dagger
•
•
•
bullet
…
…
…
horizontal ellipsis
‰
‰
‰
per mille
′
′
′
minutes
″
″
″
seconds
‹
‹
‹
single left angle quotation
›
›
›
single right angle quotation
‾
‾
‾
overline
€
€
€
euro
™
™ or
™
trademark
←
←
←
left arrow
↑
↑
↑
up arrow
→
→
→
right arrow
↓
↓
↓
down arrow
↔
↔
↔
left right arrow
↵
↵
↵
carriage return arrow
⌈
⌈
⌈
left ceiling
⌉
⌉
⌉
right ceiling
⌊
⌊
⌊
left floor
⌋
⌋
⌋
right floor
◊
◊
◊
lozenge
♠
♠
♠
spade
♣
♣
♣
club
♥
♥
♥
heart
♦
♦
♦
diamond
⁄
⁄
⁄
fraction slash
℘
℘
℘
script capital P = power set = Weierstrass p
ℑ
ℑ
ℑ
black-letter capital I = imaginary part
ℜ
ℜ
ℜ
black-letter capital R = real part symbol
ℵ
ℵ
ℵ
alef symbol = first transfinite cardinal
⇐
⇐
⇐
leftwards double arrow
⇑
⇑
⇑
upwards double arrow
⇒
⇒
⇒
rightwards double arrow
⇓
⇓
⇓
downwards double arrow
⇔
⇔
⇔
left right double arrow
⟨
〈
⟨
left-pointing angle bracket = bra
⟩
〉
⟩
right-pointing angle bracket = ket
A Character Entity Reference is an encoding of a character in several characters from a limited character set.
The name Character Entity Reference is used for document structuring technologies of the World Wide Web Consortium, such as HTML, XML and XHTML.
ShareThis Copy and PasteEncode & decode HTML entities Convert special characters to HTML entities homeprint reference ingnore HTML tags "" " " quotation mark ' ' ' apostrophe & & & ampersand < < < less-than > > > greater-than   non-breaking space ¡ ¡ ¡ inverted exclamation mark ¢ ¢ ¢ cent £ £ £ pound ¤ ¤ ¤ currency ¥ ¥ ¥ yen ¦ ¦ ¦ broken vertical bar § § § section ¨ ¨ ¨ spacing diaeresis © © © copyright ª ª ª feminine ordinal indicator « « « angle quotation mark (left) ¬ ¬ ¬ negation ­ ­ soft hyphen ® ® ® registered trademark ¯ ¯ ¯ spacing macron ° ° ° degree ± ± ± plus-or-minus ² ² ² superscript 2 ³ ³ ³ superscript 3 ´ ´ ´ spacing acute µ µ µ micro ¶ ¶ ¶ paragraph · · · middle dot ¸ ¸ ¸ spacing cedilla ¹ ¹ ¹ superscript 1 º º º masculine ordinal indicator » » » angle quotation mark (right) ¼ ¼ ¼ fraction 1/4 ½ ½ ½ fraction 1/2 ¾ ¾ ¾ fraction 3/4 ¿ ¿ ¿ inverted question mark × × × multiplication ÷ ÷ ÷ division À À À capital a, grave accent Á Á Á capital a, acute accent    capital a, circumflex accent à à à capital a, tilde Ä Ä Ä capital a, umlaut mark Å Å Å capital a, ring Æ Æ Æ capital ae Ç Ç Ç capital c, cedilla È È È capital e, grave accent É É É capital e, acute accent Ê Ê Ê capital e, circumflex accent Ë Ë Ë capital e, umlaut mark Ì Ì Ì capital i, grave accent Í Í Í capital i, acute accent Î Î Î capital i, circumflex accent Ï Ï Ï capital i, umlaut mark Ð Ð Ð capital eth, Icelandic Ñ Ñ Ñ capital n, tilde Ò Ò Ò capital o, grave accent Ó Ó Ó capital o, acute accent Ô Ô Ô capital o, circumflex accent Õ Õ Õ capital o, tilde Ö Ö Ö capital o, umlaut mark Ø Ø Ø capital o, slash Ù Ù Ù capital u, grave accent Ú Ú Ú capital u, acute accent Û Û Û capital u, circumflex accent Ü Ü Ü capital u, umlaut mark Ý Ý Ý capital y, acute accent Þ Þ Þ capital THORN, Icelandic ß ß ß small sharp s, German à à à small a, grave accent á á á small a, acute accent â â â small a, circumflex accent ã ã ã small a, tilde ä ä ä small a, umlaut mark å å å small a, ring æ æ æ small ae ç ç ç small c, cedilla è è è small e, grave accent é é é small e, acute accent ê ê ê small e, circumflex accent ë ë ë small e, umlaut mark ì ì ì small i, grave accent í í í small i, acute accent î î î small i, circumflex accent ï ï ï small i, umlaut mark ð ð ð small eth, Icelandic ñ ñ ñ small n, tilde ò ò ò small o, grave accent ó ó ó small o, acute accent ô ô ô small o, circumflex accent õ õ õ small o, tilde ö ö ö small o, umlaut mark ø ø ø small o, slash ù ù ù small u, grave accent ú ú ú small u, acute accent û û û small u, circumflex accent ü ü ü small u, umlaut mark ý ý ý small y, acute accent þ þ þ small thorn, Icelandic ÿ ÿ ÿ small y, umlaut mark ∀ ∀ ∀ for all ∂ ∂ ∂ part ∃ ∃ ∃ exists ∅ ∅ ∅ empty ∇ ∇ ∇ nabla ∈ ∈ ∈ isin ∉ ∉ ∉ notin ∋ ∋ ∋ ni ∏ ∏ ∏ prod ∑ ∑ ∑ sum − − − minus ∗ ∗ ∗ lowast √ √ √ square root ∝ ∝ ∝ proportional to ∞ ∞ ∞ infinity ∠ ∠ ∠ angle ∧ ∧ ∧ and ∨ ∨ ∨ or ∩ ∩ ∩ cap ∪ ∪ ∪ cup ∫ ∫ ∫ integral ∴ ∴ ∴ therefore ∼ ∼ ∼ similar to ≅ ≅ ≅ congruent to ≈ ≈ ≈ almost equal ≠ ≠ ≠ not equal ≡ ≡ ≡ equivalent ≤ ≤ ≤ less or equal ≥ ≥ ≥ greater or equal ⊂ ⊂ ⊂ subset of ⊃ ⊃ ⊃ superset of ⊄ ⊄ ⊄ not subset of ⊆ ⊆ ⊆ subset or equal ⊇ ⊇ ⊇ superset or equal ⊕ ⊕ ⊕ circled plus ⊗ ⊗ ⊗ circled times ⊥ ⊥ ⊥ perpendicular ⋅ ⋅ ⋅ dot operator Α Α Α Alpha Β Β Β Beta Γ Γ Γ Gamma Δ Δ Δ Delta Ε Ε Ε Epsilon Ζ Ζ Ζ Zeta Η Η Η Eta Θ Θ Θ Theta Ι Ι Ι Iota Κ Κ Κ Kappa Λ Λ Λ Lambda Μ Μ Μ Mu Ν Ν Ν Nu Ξ Ξ Ξ Xi Ο Ο Ο Omicron Π Π Π Pi Ρ Ρ Ρ Rho ς Ï ς Sigmaf Σ Σ Σ Sigma Τ Τ Τ Tau Υ Υ Υ Upsilon Φ Φ Φ Phi Χ Χ Χ Chi Ψ Ψ Ψ Psi Ω Ω Ω Omega α α α alpha β β β beta γ γ γ gamma δ δ δ delta ε ε ε epsilon ζ ζ ζ zeta η η η eta θ θ θ theta ι ι ι iota κ κ κ kappa λ λ λ lambda μ μ μ mu ν ν ν nu ξ ξ ξ xi ο ο ο omicron π π π pi ρ ρ ρ rho ς ς ς sigmaf σ σ σ sigma τ τ τ tau υ υ υ upsilon φ φ φ phi χ χ χ chi ψ ψ ψ psi ω ω ω omega ϑ ϑ ϑ theta symbol ϒ ϒ ϒ upsilon symbol ϖ ϖ ϖ pi symbol Œ Œ Œ capital ligature OE œ œ œ small ligature oe Š Š Š capital S with caron š š š small S with caron Ÿ Ÿ Ÿ capital Y with diaeres ƒ ƒ ƒ f with hook ˆ ˆ ˆ modifier letter circumflex accent ˜ ˜ ˜ small tilde     en space     em space     thin space ‌ ‌ zero width non-joiner ‍ ‍ zero width joiner ‎ ‎ left-to-right mark ‏ ‏ right-to-left mark – – – en dash — — — em dash ‘ ‘ ‘ left single quotation mark ’ ’ ’ right single quotation mark ‚ ‚ ‚ single low-9 quotation mark “ “ “ left double quotation mark ” ” ” right double quotation mark „ „ „ double low-9 quotation mark † † † dagger ‡ ‡ ‡ double dagger • • • bullet … … … horizontal ellipsis ‰ ‰ ‰ per mille ′ ′ ′ minutes ″ ″ ″ seconds ‹ ‹ ‹ single left angle quotation › › › single right angle quotation ‾ ‾ ‾ overline € € € euro ™ ™ or ™ trademark ← ← ← left arrow ↑ ↑ ↑ up arrow → → → right arrow ↓ ↓ ↓ down arrow ↔ ↔ ↔ left right arrow ↵ ↵ ↵ carriage return arrow ⌈ ⌈ ⌈ left ceiling ⌉ ⌉ ⌉ right ceiling ⌊ ⌊ ⌊ left floor ⌋ ⌋ ⌋ right floor ◊ ◊ ◊ lozenge ♠ ♠ ♠ spade ♣ ♣ ♣ club ♥ ♥ ♥ heart ♦ ♦ ♦ diamond ⁄ ⁄ ⁄ fraction slash ℘ ℘ ℘ script capital P = power set = Weierstrass p ℑ ℑ ℑ black-letter capital I = imaginary part ℜ ℜ ℜ black-letter capital R = real part symbol ℵ ℵ ℵ alef symbol = first transfinite cardinal ⇐ ⇐ ⇐ leftwards double arrow ⇑ ⇑ ⇑ upwards double arrow ⇒ ⇒ ⇒ rightwards double arrow ⇓ ⇓ ⇓ downwards double arrow ⇔ ⇔ ⇔ left right double arrow ⟨ 〈 ⟨ left-pointing angle bracket = bra ⟩ 〉 ⟩ right-pointing angle bracket = ket A Character Entity Reference is an encoding of a character in several characters from a limited character set. The name Character Entity Reference is used for document structuring technologies of the World Wide Web Consortium, such as HTML, XML and XHTML. Encode & decode HTML entities Convert special characters to HTML entities homeprint reference ingnore HTML tags "" " " quotation mark ' ' ' apostrophe & & & ampersand < < < less-than > > > greater-than   non-breaking space ¡ ¡ ¡ inverted exclamation mark ¢ ¢ ¢ cent £ £ £ pound ¤ ¤ ¤ currency ¥ ¥ ¥ yen ¦ ¦ ¦ broken vertical bar § § § section ¨ ¨ ¨ spacing diaeresis © © © copyright ª ª ª feminine ordinal indicator « « « angle quotation mark (left) ¬ ¬ ¬ negation ­ ­ soft hyphen ® ® ® registered trademark ¯ ¯ ¯ spacing macron ° ° ° degree ± ± ± plus-or-minus ² ² ² superscript 2 ³ ³ ³ superscript 3 ´ ´ ´ spacing acute µ µ µ micro ¶ ¶ ¶ paragraph · · · middle dot ¸ ¸ ¸ spacing cedilla ¹ ¹ ¹ superscript 1 º º º masculine ordinal indicator » » » angle quotation mark (right) ¼ ¼ ¼ fraction 1/4 ½ ½ ½ fraction 1/2 ¾ ¾ ¾ fraction 3/4 ¿ ¿ ¿ inverted question mark × × × multiplication ÷ ÷ ÷ division À À À capital a, grave accent Á Á Á capital a, acute accent    capital a, circumflex accent à à à capital a, tilde Ä Ä Ä capital a, umlaut mark Å Å Å capital a, ring Æ Æ Æ capital ae Ç Ç Ç capital c, cedilla È È È capital e, grave accent É É É capital e, acute accent Ê Ê Ê capital e, circumflex accent Ë Ë Ë capital e, umlaut mark Ì Ì Ì capital i, grave accent Í Í Í capital i, acute accent Î Î Î capital i, circumflex accent Ï Ï Ï capital i, umlaut mark Ð Ð Ð capital eth, Icelandic Ñ Ñ Ñ capital n, tilde Ò Ò Ò capital o, grave accent Ó Ó Ó capital o, acute accent Ô Ô Ô capital o, circumflex accent Õ Õ Õ capital o, tilde Ö Ö Ö capital o, umlaut mark Ø Ø Ø capital o, slash Ù Ù Ù capital u, grave accent Ú Ú Ú capital u, acute accent Û Û Û capital u, circumflex accent Ü Ü Ü capital u, umlaut mark Ý Ý Ý capital y, acute accent Þ Þ Þ capital THORN, Icelandic ß ß ß small sharp s, German à à à small a, grave accent á á á small a, acute accent â â â small a, circumflex accent ã ã ã small a, tilde ä ä ä small a, umlaut mark å å å small a, ring æ æ æ small ae ç ç ç small c, cedilla è è è small e, grave accent é é é small e, acute accent ê ê ê small e, circumflex accent ë ë ë small e, umlaut mark ì ì ì small i, grave accent í í í small i, acute accent î î î small i, circumflex accent ï ï ï small i, umlaut mark ð ð ð small eth, Icelandic ñ ñ ñ small n, tilde ò ò ò small o, grave accent ó ó ó small o, acute accent ô ô ô small o, circumflex accent õ õ õ small o, tilde ö ö ö small o, umlaut mark ø ø ø small o, slash ù ù ù small u, grave accent ú ú ú small u, acute accent û û û small u, circumflex accent ü ü ü small u, umlaut mark ý ý ý small y, acute accent þ þ þ small thorn, Icelandic ÿ ÿ ÿ small y, umlaut mark ∀ ∀ ∀ for all ∂ ∂ ∂ part ∃ ∃ ∃ exists ∅ ∅ ∅ empty ∇ ∇ ∇ nabla ∈ ∈ ∈ isin ∉ ∉ ∉ notin ∋ ∋ ∋ ni ∏ ∏ ∏ prod ∑ ∑ ∑ sum − − − minus ∗ ∗ ∗ lowast √ √ √ square root ∝ ∝ ∝ proportional to ∞ ∞ ∞ infinity ∠ ∠ ∠ angle ∧ ∧ ∧ and ∨ ∨ ∨ or ∩ ∩ ∩ cap ∪ ∪ ∪ cup ∫ ∫ ∫ integral ∴ ∴ ∴ therefore ∼ ∼ ∼ similar to ≅ ≅ ≅ congruent to ≈ ≈ ≈ almost equal ≠ ≠ ≠ not equal ≡ ≡ ≡ equivalent ≤ ≤ ≤ less or equal ≥ ≥ ≥ greater or equal ⊂ ⊂ ⊂ subset of ⊃ ⊃ ⊃ superset of ⊄ ⊄ ⊄ not subset of ⊆ ⊆ ⊆ subset or equal ⊇ ⊇ ⊇ superset or equal ⊕ ⊕ ⊕ circled plus ⊗ ⊗ ⊗ circled times ⊥ ⊥ ⊥ perpendicular ⋅ ⋅ ⋅ dot operator Α Α Α Alpha Β Β Β Beta Γ Γ Γ Gamma Δ Δ Δ Delta Ε Ε Ε Epsilon Ζ Ζ Ζ Zeta Η Η Η Eta Θ Θ Θ Theta Ι Ι Ι Iota Κ Κ Κ Kappa Λ Λ Λ Lambda Μ Μ Μ Mu Ν Ν Ν Nu Ξ Ξ Ξ Xi Ο Ο Ο Omicron Π Π Π Pi Ρ Ρ Ρ Rho ς Ï ς Sigmaf Σ Σ Σ Sigma Τ Τ Τ Tau Υ Υ Υ Upsilon Φ Φ Φ Phi Χ Χ Χ Chi Ψ Ψ Ψ Psi Ω Ω Ω Omega α α α alpha β β β beta γ γ γ gamma δ δ δ delta ε ε ε epsilon ζ ζ ζ zeta η η η eta θ θ θ theta ι ι ι iota κ κ κ kappa λ λ λ lambda μ μ μ mu ν ν ν nu ξ ξ ξ xi ο ο ο omicron π π π pi ρ ρ ρ rho ς ς ς sigmaf σ σ σ sigma τ τ τ tau υ υ υ upsilon φ φ φ phi χ χ χ chi ψ ψ ψ psi ω ω ω omega ϑ ϑ ϑ theta symbol ϒ ϒ ϒ upsilon symbol ϖ ϖ ϖ pi symbol Œ Œ Œ capital ligature OE œ œ œ small ligature oe Š Š Š capital S with caron š š š small S with caron Ÿ Ÿ Ÿ capital Y with diaeres ƒ ƒ ƒ f with hook ˆ ˆ ˆ modifier letter circumflex accent ˜ ˜ ˜ small tilde     en space     em space     thin space ‌ ‌ zero width non-joiner ‍ ‍ zero width joiner ‎ ‎ left-to-right mark ‏ ‏ right-to-left mark – – – en dash — — — em dash ‘ ‘ ‘ left single quotation mark ’ ’ ’ right single quotation mark ‚ ‚ ‚ single low-9 quotation mark “ “ “ left double quotation mark ” ” ” right double quotation mark „ „ „ double low-9 quotation mark † † † dagger ‡ ‡ ‡ double dagger • • • bullet … … … horizontal ellipsis ‰ ‰ ‰ per mille ′ ′ ′ minutes ″ ″ ″ seconds ‹ ‹ ‹ single left angle quotation › › › single right angle quotation ‾ ‾ ‾ overline € € € euro ™ ™ or ™ trademark ← ← ← left arrow ↑ ↑ ↑ up arrow → → → right arrow ↓ ↓ ↓ down arrow ↔ ↔ ↔ left right arrow ↵ ↵ ↵ carriage return arrow ⌈ ⌈ ⌈ left ceiling ⌉ ⌉ ⌉ right ceiling ⌊ ⌊ ⌊ left floor ⌋ ⌋ ⌋ right floor ◊ ◊ ◊ lozenge ♠ ♠ ♠ spade ♣ ♣ ♣ club ♥ ♥ ♥ heart ♦ ♦ ♦ diamond ⁄ ⁄ ⁄ fraction slash ℘ ℘ ℘ script capital P = power set = Weierstrass p ℑ ℑ ℑ black-letter capital I = imaginary part ℜ ℜ ℜ black-letter capital R = real part symbol ℵ ℵ ℵ alef symbol = first transfinite cardinal ⇐ ⇐ ⇐ leftwards double arrow ⇑ ⇑ ⇑ upwards double arrow ⇒ ⇒ ⇒ rightwards double arrow ⇓ ⇓ ⇓ downwards double arrow ⇔ ⇔ ⇔ left right double arrow ⟨ 〈 ⟨ left-pointing angle bracket = bra ⟩ 〉 ⟩ right-pointing angle bracket = ket A Character Entity Reference is an encoding of a character in several characters from a limited character set. The name Character Entity Reference is used for document structuring technologies of the World Wide Web Consortium, such as HTML, XML and XHTML. ShareThis Copy and Paste";
RegexOptions options = RegexOptions.Singleline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx