Remove Markdown formatting and return plain text.
Code
Generalmarkdown
.replace(/^#{1,6}\s+/gm, '') // Headers
.replace(/\*\*(.+?)\*\*/g, '$1') // Bold
.replace(/\*(.+?)\*/g, '$1') // Italic
.replace(/__(.+?)__/g, '$1') // Bold alt
.replace(/_(.+?)_/g, '$1') // Italic alt
.replace(/`{3}[\s\S]*?`{3}/g, '') // Code blocks
.replace(/`(.+?)`/g, '$1') // Inline code
.replace(/\[(.+?)\]\(.+?\)/g, '$1') // Links
.replace(/!\[.*?\]\(.+?\)/g, '') // Images
.replace(/^\s*[-*+]\s+/gm, '') // List items
.replace(/^\s*\d+\.\s+/gm, '') // Numbered lists
.replace(/^\s*>/gm, '') // Blockquotes
.replace(/---/g, '') // Horizontal rules
.trim();Parameters
Markdown text
Browser·fetch() may be limited by CORS
More JavaScript Snippets
Capitalize First Letter
Capitalize the first letter of a string while keeping the rest unchanged.
Center String
Center a string within a given width by padding with spaces.
Check if Palindrome
Check if a string is a palindrome by comparing characters from both ends.
Compare Strings (Case Insensitive)
Compare two strings ignoring case differences.
Convert to Camel Case
Convert a string to camelCase format with lowercase first letter.
Convert to Kebab Case
Convert a string to kebab-case format.