Regular Expressions 101

Community Patterns

1...45678...631

Markdown JSON codeblock match

0

Regular Expression
ECMAScript (JavaScript)

/
^[^]*?`{3}(?:json)?\n(.*[^]*?)\n`{3}[^]*?$
/
i

Description

Useful to extract JSON from LLM markdown responses

Submitted by Lamer217 - 10 months ago (Last modified 10 months ago)