Da traduttori professionisti, imprese, pagine web e archivi di traduzione disponibili gratuitamente al pubblico.
opening parentheses are counted from left to right (starting from 1) to obtain the number of the capturing subpattern.
replacement may contain references of the form\\ n or (since php 4.0.4) $n, with the latter form being the preferred one. every such reference will be replaced by the text captured by the n 'th parenthesized pattern. n can be from 0 to 99, and \\0 or $0 refers to the text matched by the whole pattern. opening parentheses are counted from left to right (starting from 1) to obtain the number of the capturing subpattern.
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
when a capturing subpattern is repeated, the value capturedwhen a capturing subpattern is repeated, the value captured is the substring that matched the final iteration.
the precise effect of "\cx" is as follows: if "x" is a lower case letter, it is converted to upper case. then bit 6 of the character (hex 40) is inverted. thus "\cz" becomes hex 1a, but "\c{" becomes hex 3b, while "\c;" becomes hex 7b.
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
Attenzione: contiene formattazione HTML nascosta
an alternative description is that a subpattern of this type matches the string of characters that an identical standalone pattern would match, if anchored at the current point in the subject string.
each pair of escape sequences partitions the complete set of characters into two disjoint sets. any given character matches one, and only one, of each pair.
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
the values set for any capturing subpatterns are those from the outermost level of the recursion at which the subpatternthe values set for any capturing subpatterns are those from the outermost level of the recursion at which the subpattern value is set.
subpatterns are delimited by parentheses (round brackets), which can be nested. marking part of a pattern as a subpattern does two things: 1. it localizes a set of alternatives. for example, the pat- tern cat(aract_bar_erpillar_bar_) matches one of the words "cat", "cataract", or "caterpillar". without the parentheses, it would match "cataract", "erpillar" or the empty string. 2. it sets up the subpattern as a capturing subpattern (as defined above). when the whole pattern matches, that portion of the subject string that matched the subpattern is passed back to the caller via the ovector argument of pcre_exec(). opening parentheses are counted from left to right (starting from 1) to obtain the numbers of the capturing subpatterns. for example, if the string "the red king" is matched against the pattern the ((red_bar_white) (king_bar_queen)) the captured substrings are "red king", "red", and "king", and are numbered 1, 2, and 3. the fact that plain parentheses fulfil two functions is not always helpful. there are often times when a grouping subpattern is required without a capturing requirement. if an opening parenthesis is followed by "?:", the subpattern does not do any capturing, and is not counted when computing the number of any subsequent capturing subpatterns. for example, if the string "the white queen" is matched against the pattern the ((?:red_bar_white) (king_bar_queen)) the captured substrings are "white queen" and "queen", and are numbered 1 and 2. the maximum number of captured substrings is 99, and the maximum number of all subpatterns, both capturing and non-capturing, is 200. as a convenient shorthand, if any option settings are required at the start of a non-capturing subpattern, the option letters may appear between the "?" and the ":". thus the two patterns (?i:saturday_bar_sunday) (?:(?i)saturday_bar_sunday) match exactly the same set of strings. because alternative branches are tried from left to right, and options are not reset until the end of the subpattern is reached, an option setting in one branch does affect subsequent branches, so the above patterns match "sunday" as well as "saturday".
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
Attenzione: contiene formattazione HTML nascosta
when the whole pattern matches, that portion of the subject string that matched the subpattern is passed back to the caller via the ovector argument of pcre_exec().
the backslash character has several uses. firstly, if it is followed by a non-alphanumeric character, it takes away any special meaning that character may have. this use of backslash as an escape character applies both inside and outside character classes.
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
however, because there are cases where this can be useful, such patterns are now accepted, but if any repetition of the subpattern does in fact match no characters, the loop is forcibly broken.
formfeed (hex 0c)
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità:
a description of how this works is given later, following the discussion of parenthesized subpatterns.
although lookbehind assertions must match fixed length strings, each alternative branch of a lookbehind assertion can match a different length of string. perl 5.005 requires them all to have the same length.
Ultimo aggiornamento 2011-10-24
Frequenza di utilizzo: 1
Qualità: