Regular Expressions 101

Community Patterns

1...56789...902

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
\*(.*?)((?<!\\)|(?<=\\\\))\*
/
g

Description

Telegram Markdown V2's bold (*) can be escaped by using \*. RegExp to validate it and get the actual contents inside.

Submitted by dcdunkan - 3 years ago