You are looking at the HTML representation of the XML format.
HTML is good for debugging, but is unsuitable for application use.
Specify the format parameter to change the output format.
To see the non HTML representation of the XML format, set format=xml.
See the complete documentation, or API help for more information.
<?xml version="1.0"?>
<api>
  <query-continue>
    <allpages gapcontinue="RepeatingSum" />
  </query-continue>
  <query>
    <pages>
      <page pageid="5823" ns="0" title="Regex Snippets">
        <revisions>
          <rev xml:space="preserve">{{revdate}}{{stub}}
Roll20-related {{wiki|Regular_expression|Regex}} snippets, that could be useful in [[Macro Guide|macro generation]], [[Character Sheet Development]]- and [[API Development]], along with creating external tools.

Depending on where you use the snippets, you might need to escape

=Snippets=

* &lt;code&gt;/(\/roll|\/r|\/em|\/w|\/whisper|\/gmroll|\/gr|\/ooc|\/fx|\/desc|\/as|\/emas|\/talktomyself|(\!|\#)[a-z\\-]*)/g&lt;/code&gt; - target any of the {{Text Chat}} commands, or any API command keywords (e.g.{{c|!token-mod}}) - [https://github.com/Anduh/rmacro/blob/a0ca976d20d4510d673346603e5164924b5cba85/syntaxes/rmacro.tmLanguage.json#L53 source]
* &lt;code&gt;/&amp;(?:[a-z\d]+|#\d+|#x[a-f\d]+);/g&lt;/code&gt; target any [[HTML Entities|HTML entity]] - [https://regexr.com/3eauj source]

TODO
* snippets to detect character_id, token_id, [[RowID]], attibutes
* improve above examples 

==Use Examples==

* [https://github.com/Roll20/roll20-character-sheets/blob/c4a6c37a53ca7c8375d75c0b6e5062cb6ffa089b/Supers-Revised-Edition/supers-revised.html#L1653 Supers RED char sheet] -- uses regex in [[Custom Roll Parsing]]-sheetworkers to parse [[Repeating Section]] attributes and sanitize attributes containing text intended to display with the final result
* [https://github.com/Roll20/roll20-api-scripts/blob/master/ChatSetAttr/1.10/ChatSetAttr.js 1.10/ChatSetAttr.js] -- [[ChatSetAttr]] API uses regex to parse and replace user commands with regex.
* [https://github.com/Anduh/rmacro/blob/main/syntaxes/rmacro.tmLanguage.json Roll20 Macros] -- [[VS Code]] extension to show syntax highlight for roll20 macros. Uses regex to identify snippets to highlight.

=Related Pages=
* [[VS Code]]
* [[Custom Roll Parsing]] - using regex is common for parsing roll results

=Links=
* https://regexr.com/ - has a search for community snippets
* https://regexper.com/ - visualize regex snippets
* https://regex101.com/

[[Category:Character Sheet Creation]]
[[Category:Character Sheet Development]]
[[Category:API Development]]
[[Category:Miscellaneous]]
[[Category:External Tools]]</rev>
        </revisions>
      </page>
      <page pageid="2635" ns="0" title="Remerciements">
        <revisions>
          <rev xml:space="preserve">La section en français du wiki est initialement crée puis tenue bénévolement tenue par JBdAmiens et bénéficie de la contribution bénévole des utilisateurs.
[[Category:Language-FR]]</rev>
        </revisions>
      </page>
    </pages>
  </query>
</api>