JSFiddle - React, Tailwind, and code Playground

by bvotcode

JavaScript

var markdown = "abc [I'm an inline-style link](https://www.google.com) xyz [xxx](https://www.google.com)";
var html = markdown.replace(/\[([^\]]+)\]\(([^\)]+)\)/, '<a href="$2">$1</a>');

alert(html);