Regex describing a regex pattern?
<p>I am surprised that an answer to this is not easily found.</p>

<p>I am in the process of making a JSON schema. I have an object and one of it's properties is a string containing a regex pattern. This property must contain only regex.</p>

<p>So, this question is realistically two questions in one:</p>

<p>What is the regex pattern that describes regex patterns (javascript-compatible please)?</p>

<p>Secondly, how do I apply this to JSON schema (in the <code>"pattern"</code> property or even in the <code>"patternProperty"</code><sup>1</sup> property)?</p>

<p><sup>1</sup>: I have no idea what purpose would require you to apply this in <code>"patternProperty"</code>, but someone out there could find it useful</p>

<p><strong>NOTE:</strong> Since, JSONschema is JSON and JSON is JavaScript-based, JavaScript scripters may find the solution (to the JSONschema-side of the question), as well as the problem, useful in their scripts.</p>