Alternation and repetition
Sequence | Greedy | Description |
---|---|---|
...|... | - | Try subpatterns in alternation. |
* | yes | Match 0 or more times. |
+ | yes | Match 1 or more times. |
? | yes | Match 0 or 1 times. |
{n} | no | Match exactly n times. |
{n,} | yes | Match at least n times. |
{n,m} | yes | Match at least n times but no more than m times. |
*? | no | Match 0 or more times. |
+? | no | Match 1 or more times. |
?? | no | Match 0 or 1 times. |
{n,}? | no | Match at least n times. |
{n,m}? | no | Match at least n times but no more than m times. |
{MACRO} | - | Include the regex MACRO in the current regex. |

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/parle.regex.alternation.php