diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1998-01-11 15:34:05 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-02-06 16:01:36 +0000 |
commit | cc6b73957505a73b130c87add7bf3d534f129041 (patch) | |
tree | 9eae2f71c172110fb9ec7dfb5f002ebb937fd46c /pod/perlre.pod | |
parent | e5724059399517e049ad3e9429cfece6d66ce97f (diff) | |
download | perl-cc6b73957505a73b130c87add7bf3d534f129041.tar.gz |
5.004_56: Patch to Tie::Hash and docs
Date: Sun, 11 Jan 1998 20:34:05 -0500 (EST)
Subject: 5.004_56: Patch to (?{}) quoting + cosmetic
Date: Mon, 2 Feb 1998 01:28:46 -0500 (EST)
p4raw-id: //depot/perl@470
Diffstat (limited to 'pod/perlre.pod')
-rw-r--r-- | pod/perlre.pod | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod index 7d0ba542f8..373e1ca84e 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -251,12 +251,12 @@ function of the extension. Several extensions are already supported: =over 10 -=item (?#text) +=item C<(?#text)> A comment. The text is ignored. If the C</x> switch is used to enable whitespace formatting, a simple C<#> will suffice. -=item (?:regexp) +=item C<(?:regexp)> This groups things like "()" but doesn't make backreferences like "()" does. So @@ -268,12 +268,12 @@ is like but doesn't spit out extra fields. -=item (?=regexp) +=item C<(?=regexp)> A zero-width positive lookahead assertion. For example, C</\w+(?=\t)/> matches a word followed by a tab, without including the tab in C<$&>. -=item (?!regexp) +=item C<(?!regexp)> A zero-width negative lookahead assertion. For example C</foo(?!bar)/> matches any occurrence of "foo" that isn't followed by "bar". Note @@ -291,24 +291,23 @@ easier just to say: For lookbehind see below. -=item (?<=regexp) +=item C<(?<=regexp)> A zero-width positive lookbehind assertion. For example, C</(?=\t)\w+/> matches a word following a tab, without including the tab in C<$&>. Works only for fixed-width lookbehind. -=item (?<!regexp) +=item C<(?<!regexp)> A zero-width negative lookbehind assertion. For example C</(?<!bar)foo/> matches any occurrence of "foo" that isn't following "bar". Works only for fixed-width lookbehind. -=item (?{ code }) +=item C<(?{ code })> Experimental "evaluate any Perl code" zero-width assertion. Always -succeeds. Currently the quoting rules are somewhat convoluted, as is the -determination where the C<code> ends. - +succeeds. C<code> is not interpolated. Currently the rules to +determine where the C<code> ends are somewhat convoluted. =item C<(?E<gt>regexp)> @@ -371,9 +370,9 @@ Note that on simple groups like the above C<(?> [^()]+ )> a similar effect may be achieved by negative lookahead, as in C<[^()]+ (?! [^()] )>. This was only 4 times slower on a string with 1000000 C<a>s. -=item (?(condition)yes-regexp|no-regexp) +=item C<(?(condition)yes-regexp|no-regexp)> -=item (?(condition)yes-regexp) +=item C<(?(condition)yes-regexp)> Conditional expression. C<(condition)> should be either an integer in parentheses (which is valid if the corresponding pair of parentheses @@ -388,7 +387,7 @@ Say, matches a chunk of non-parentheses, possibly included in parentheses themselves. -=item (?imsx) +=item C<(?imsx)> One or more embedded pattern-match modifiers. This is particularly useful for patterns that are specified in a table somewhere, some of |