mirror of
https://github.com/boostorg/regex.git
synced 2025-07-13 20:36:39 +02:00
Added docs for forward lookahead asserts.
[SVN r12757]
This commit is contained in:
15
syntax.htm
15
syntax.htm
@ -157,9 +157,18 @@ but don't want the parenthesis to spit out another marked sub-expression,
|
|||||||
in this case a non-marking parenthesis (?:expression) can be used.
|
in this case a non-marking parenthesis (?:expression) can be used.
|
||||||
For example the following expression creates no sub-expressions: </p>
|
For example the following expression creates no sub-expressions: </p>
|
||||||
|
|
||||||
<p>"(?:abc)*" <br>
|
<p>"(?:abc)*"</p>
|
||||||
<br>
|
|
||||||
</p>
|
<p><em>Forward Lookahead Asserts</em> </p>
|
||||||
|
|
||||||
|
<p>There are two forms of these; one for positive forward
|
||||||
|
lookahead asserts, and one for negative lookahead asserts:</p>
|
||||||
|
|
||||||
|
<p>"(?=abc)" matches zero characters only if they are
|
||||||
|
followed by the expression "abc".</p>
|
||||||
|
|
||||||
|
<p>"(?!abc)" matches zero characters only if they are
|
||||||
|
not followed by the expression "abc".</p>
|
||||||
|
|
||||||
<p><i>Alternatives</i> </p>
|
<p><i>Alternatives</i> </p>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user