Skip to content
Browse files

[p6-regex-quick-ref] quantifiers, conjunctions and disjunctions

  • Loading branch information...
1 parent c6502a0 commit 16307e9a8cc54d49b147311cba9d32cb7c85813e @moritz moritz committed
Showing with 18 additions and 0 deletions.
  1. +18 −0 quick-ref/p6-regex-quick-ref.pod
18 quick-ref/p6-regex-quick-ref.pod
@@ -16,6 +16,24 @@ All other characters preceded by a backslash are literal.
<...> Assertion (does this thing match?)
:... introduces a modifier
+=head2 Quantifiers
+Quantifiers specify how often the preceeding term has to match. There is a
+non-greedy variant of each quantifier which you get by appending a question
+mark C<?> to the quantifier
+ ? zero or one match
+ * at least zero matches
+ + at least one match
+ ** NUM exactly NUM matches
+ ** NUM1..NUM2 NUM1 to NUM2 matches
+=head2 Conjuctions and disjunctions
+ A | B match A or B; longest match wins
+ A || B match A or B; first match wins
+ A & B match A and B with same length
+ A && B match A and B with same length; guarentueed order of execution
=head2 Assertions

0 comments on commit 16307e9

Please sign in to comment.
Something went wrong with that request. Please try again.