Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
<code(?:\s[^>]*)?>[\s\S]*?<\/code>|`{3}([\S\s]*?)`{3}|`([^`]*)`|~~([\S\s]*?)~~|\*{2}([\s\S]*?)\*{2}(?!\*)|\*([^*]*)\*|__([\s\S]*?)__
/
gm
Input 1
1
New
**bold and *italic and __underline and ~~strikethrough~~__*** `~~Not strikethrough~~` ~~`Strikethrough`~~ Normal text ``` ~~Not strikethrough~~ ``` ~~``` Strikethrough ```~~ **bold and *italic and __underline and ~~strikethrough~~__*** `~~Not strikethrough~~` ~~`Strikethrough`~~ Normal text
Extraction
**bold and *italic and __underline and ~~strikethrough~~__*** `~~Not strikethrough~~` ~~`Strikethrough`~~ Normal text ``` ~~Not strikethrough~~ ``` ~~``` Strikethrough ```~~ **bold and *italic and __underline and ~~strikethrough~~__*** `~~Not strikethrough~~` ~~`Strikethrough`~~ Normal text