<li><ahref="ast/enum.Ast.html"title="enum regex_syntax::ast::Ast"><code>Ast</code></a> is the abstract syntax of a regular expression.
An abstract syntax corresponds to a <em>structured representation</em> of the
concrete syntax of a regular expression, where the concrete syntax is the
pattern string itself (e.g., <code>foo(bar)+</code>). Given some abstract syntax, it
can be converted back to the original concrete syntax (modulo some details,
like whitespace). To a first approximation, the abstract syntax is complex
and difficult to analyze.</li>
<li><ahref="hir/struct.Hir.html"title="struct regex_syntax::hir::Hir"><code>Hir</code></a> is the high-level intermediate representation
(“HIR” or “high-level IR” for short) of regular expression. It corresponds to
an intermediate state of a regular expression that sits between the abstract
syntax and the low level compiled opcodes that are eventually responsible for
executing a regular expression search. Given some high-level IR, it is not
possible to produce the original concrete syntax (although it is possible to
produce an equivalent concrete syntax, but it will likely scarcely resemble
the original pattern). To a first approximation, the high-level IR is simple
and easy to analyze.</li>
</ul>
<p>These two types come with conversion routines:</p>
<ul>
<li>An <ahref="ast/parse/struct.Parser.html"title="struct regex_syntax::ast::parse::Parser"><code>ast::parse::Parser</code></a> converts concrete syntax (a <code>&str</code>) to an
<li>A <ahref="hir/translate/struct.Translator.html"title="struct regex_syntax::hir::translate::Translator"><code>hir::translate::Translator</code></a> converts an <ahref="ast/enum.Ast.html"title="enum regex_syntax::ast::Ast"><code>Ast</code></a> to a
<p>As a convenience, the above two conversion routines are combined into one via
the top-level <ahref="struct.Parser.html"title="struct regex_syntax::Parser"><code>Parser</code></a> type. This <code>Parser</code> will first convert your pattern to
an <code>Ast</code> and then convert the <code>Ast</code> to an <code>Hir</code>. It’s also exposed as top-level
<p>This crate provides limited support for <ahref="hir/literal/index.html"title="mod regex_syntax::hir::literal">literal extraction from <code>Hir</code>
values</a>. Be warned that literal extraction uses recursion, and
therefore, stack size proportional to the size of the <code>Hir</code>.</p>
<p>The purpose of literal extraction is to speed up searches. That is, if you
know a regular expression must match a prefix or suffix literal, then it is
often quicker to search for instances of that literal, and then confirm or deny
the match using the full regular expression engine. These optimizations are
done automatically in the <code>regex</code> crate.</p>
</div></details><h2id="modules"class="section-header">Modules<ahref="#modules"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="mod"href="ast/index.html"title="mod regex_syntax::ast">ast</a></div><divclass="desc docblock-short">Defines an abstract syntax for regular expressions.</div></li><li><divclass="item-name"><aclass="mod"href="hir/index.html"title="mod regex_syntax::hir">hir</a></div><divclass="desc docblock-short">Defines a high-level intermediate (HIR) representation for regular expressions.</div></li><li><divclass="item-name"><aclass="mod"href="utf8/index.html"title="mod regex_syntax::utf8">utf8</a></div><divclass="desc docblock-short">Converts ranges of Unicode scalar values to equivalent ranges of UTF-8 bytes.</div></li></ul><h2id="structs"class="section-header">Structs<ahref="#structs"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="struct"href="struct.Parser.html"title="struct regex_syntax::Parser">Parser</a></div><divclass="desc docblock-short">A convenience parser for regular expressions.</div></li><li><divclass="item-name"><aclass="struct"href="struct.ParserBuilder.html"title="struct regex_syntax::ParserBuilder">ParserBuilder</a></div><divclass="desc docblock-short">A builder for a regular expression parser.</div></li><li><divclass="item-name"><aclass="struct"href="struct.UnicodeWordError.html"title="struct regex_syntax::UnicodeWordError">UnicodeWordError</a></div><divclass="desc docblock-short">An error that occurs when the Unicode-aware <code>\w</code> class is unavailable.</div></li></ul><h2id="enums"class="section-header">Enums<ahref="#enums"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="enum"href="enum.Error.html"title="enum regex_syntax::Error">Error</a></div><divclass="desc docblock-short">This error type encompasses any error that can be returned by this crate.</div></li></ul><h2id="functions"class="section-header">Functions<ahref="#functions"class="anchor">§</a></h2><ulclass="item-table"><li><divclass="item-name"><aclass="fn"href="fn.escape.html"title="fn regex_syntax::escape">escape</a></div><divclass="desc docblock-short">Escapes all regular expression meta characters in <code>text</code>.</div></li><li><divclass="item-name"><aclass="fn"href="fn.escape_into.html"title="fn regex_syntax::escape_into">escape_into</a></div><divclass="desc docblock-short">Escapes all meta characters in <code>text</code> and writes the result into <code>buf</code>.</div></li><li><divclass="item-name"><aclass="fn"href="fn.is_escapeable_character.html"title="fn regex_syntax::is_escapeable_character">is_escapeable_character</a></div><divclass="desc docblock-short">Returns true if the given character can be escaped in a regex.</div></li><li><divclass="item-name"><aclass="fn"href="fn.is_meta_character.html"title="fn regex_syntax::is_meta_character">is_meta_character</a></div><divclass="desc docblock-short">Returns true if the given character has significance in a regex.</div></li><li><divclass="item-name"><aclass="fn"href="fn.is_word_byte.html"title="fn regex_syntax::is_word_byte">is_word_byte</a></div><divclass="desc docblock-short">Returns true if and only if the given character is an ASCII word character.</div></li><li><divclass="item-name"><aclass="fn"href="fn.is_word_character.html"title="fn regex_syntax::is_word_character">is_word_character</a></div><divclass="desc docblock-short">Returns true if and only if the given character is a Unicode word
character.</div></li><li><divclass="item-name"><aclass="fn"href="fn.parse.html"title="fn regex_syntax::parse">parse</a></div><divclass="desc docblock-short">A convenience routine for parsing a regex using default options.</div></li><li><divclass="item-name"><aclass="fn"href="fn.try_is_word_character.html"title="fn regex_syntax::try_is_word_character">try_is_word_character</a></div><divclass="desc docblock-short">Returns true if and only if the given character is a Unicode word