regexmatch.dev
Explore
Open main menu
Save & Share
Facebook
Twitter
Tumblr
E-Mail
Pinterest
LinkedIn
Reddit
Telegram Markdown Escaping Backslashed asterisks
Published on Tue Mar 01 2022
Telegram Markdown V2's bold (`*`) can be escaped by using `\*`. RegExp to validate it and get the actual contents inside.
Regex
Test String
*bold \*text* *bold* text ** text* *bold text* ** * \* * *bold \\*text\* *bold \*te\*x \\*t* * efbfb *bold \*text* rgeb *gbrgv*
Additional matching regexes for
Telegram Markdown Escaping Backslashed asterisks
Telegram Markdown Escaping Backslashed asterisks
Telegram Markdown V2's bold (`*`) can be escaped by using `\*`. RegExp to validate it and get the actual contents inside.
IPv4 validation using recursion
Validate IPv4 addresses using PCRE's recursion patterns.
Extract Dirty `href` Values in HTML
Even though using a delimiter within a string, without escaping it, is an illegal character, sometimes this still happens and we need to extract a HTML value.
I need to escape " in json, issue: if they are already escaped
I'm having issues escaping quotes inside json content. I can get the \" to be put in if " is seen, the issue is I don't want that to be done if \" is in the content (as that is already escaped)
Quote Parsing
Parses quotes and can be escaped
IPV4 address validation using recursion
Validate IPv4 addresses using PCRE's recursion patterns. A shorter but less efficient alternative to https://regex101.com/r/wZ6oY5/1
Match segmented paths with '\' and '/' escaped by '\'
Match segmented paths with '\' and '/' escaped by '\'
Get Hyperlinks From Markdown Format
Get all hyperlinks in a Markdown Format Text
Get Headings From Markdown Format
Get all headings in a Markdown Format Text
Valid email regexp in Go
A regexp to validate an email address according to https://html.spec.whatwg.org/#valid-e-mail-address . Note that the backslash in the name part of the regexp on that site is there to escape the forward slash, which is not needed in Go.