Regular Expressions 101

Community Patterns

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