php教程

Alternation and repetition

Alternation and repetition
SequenceGreedyDescription
...|...-Try subpatterns in alternation.
*yesMatch 0 or more times.
+yesMatch 1 or more times.
?yesMatch 0 or 1 times.
{n}noMatch exactly n times.
{n,}yesMatch at least n times.
{n,m}yesMatch at least n times but no more than m times.
*?noMatch 0 or more times.
+?noMatch 1 or more times.
??noMatch 0 or 1 times.
{n,}?noMatch at least n times.
{n,m}?noMatch 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.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788