X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlrequick.pod;h=a31adab5eb8f4a7372c7dd70960c7b0e4d134c29;hb=351f32542342b92f7303dec0a812c5301714120f;hp=5b72a35187fafe50372a435628f0c96fed0c25da;hpb=0e06870bf080a38cda51c06c6612359afc2334e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlrequick.pod b/pod/perlrequick.pod index 5b72a35..a31adab 100644 --- a/pod/perlrequick.pod +++ b/pod/perlrequick.pod @@ -219,11 +219,11 @@ boundary. =head2 Matching this or that -We can match match different character strings with the B +We can match different character strings with the B metacharacter C<'|'>. To match C or C, we form the regex C. As before, perl will try to match the regex at the earliest possible point in the string. At each character position, -perl will first try to match the the first alternative, C. If +perl will first try to match the first alternative, C. If C doesn't match, perl will then try the next alternative, C. If C doesn't match either, then the match fails and perl moves to the next position in the string. Some examples: @@ -238,7 +238,7 @@ C is able to match earlier in the string. "cats" =~ /cats|cat|ca|c/; # matches "cats" At a given character position, the first alternative that allows the -regex match to succeed wil be the one that matches. Here, all the +regex match to succeed will be the one that matches. Here, all the alternatives match at the first string position, so th first matches. =head2 Grouping things and hierarchical matching