Aprendiendo a traducir con los ejemplos de traducciones humanas.
De traductores profesionales, empresas, páginas web y repositorios de traducción de libre uso.
the special the special item (?r) is provided for the specific case of recursion.
an opening square bracket introduces a character class, ter- minated by a closing square bracket. a closing square bracket on its own is not special. if a closing square bracket is required as a member of the class, it should be the first data character in the class (after an initial cir- cumflex, if present) or escaped with a backslash. a character class matches a single character in the subject; the character must be in the set of characters defined by the class, unless the first character in the class is a cir- cumflex, in which case the subject character must not be in the set defined by the class. if a circumflex is actually required as a member of the class, ensure it is not the first character, or escape it with a backslash. for example, the character class [aeiou] matches any lower case vowel, while [^aeiou] matches any character that is not a lower case vowel. note that a circumflex is just a con- venient notation for specifying the characters which are in the class by enumerating those that are not. it is not an assertion: it still consumes a character from the subject string, and fails if the current pointer is at the end of the string. when caseless matching is set, any letters in a class represent both their upper case and lower case versions, so for example, a caseless [aeiou] matches "a" as well as "a", and a caseless [^aeiou] does not match "a", whereas a case- ful version would. the newline character is never treated in any special way in character classes, whatever the setting of the pcre_dotall or pcre_multiline options is. a class such as [^a] will always match a newline. the minus (hyphen) character can be used to specify a range of characters in a character class. for example, [d-m] matches any letter between d and m, inclusive. if a minus character is required in a class, it must be escaped with a backslash or appear in a position where it cannot be inter- preted as indicating a range, typically as the first or last character in the class. it is not possible to have the literal character "]" as the end character of a range. a pattern such as [w-]46] is interpreted as a class of two characters ("w" and "-") fol- lowed by a literal string "46]", so it would match "w46]" or "-46]". however, if the "]" is escaped with a backslash it is interpreted as the end of range, so [w-\]46] is inter- preted as a single class containing a range followed by two separate characters. the octal or hexadecimal representation of "]" can also be used to end a range. ranges operate in ascii collating sequence. they can also be used for characters specified numerically, for example [\000-\037]. if a range that includes letters is used when caseless matching is set, it matches the letters in either case. for example, [w-c] is equivalent to [][\^_`wxyzabc], matched caselessly, and if character tables for the "fr" locale are in use, [\xc8-\xcb] matches accented e characters in both cases. the character types \d, \d, \s, \s, \w, and \w may also appear in a character class, and add the characters that they match to the class. for example, [\dabcdef] matches any hexadecimal digit. a circumflex can conveniently be used with the upper case character types to specify a more res- tricted set of characters than the matching lower case type. for example, the class [^\w_] matches any letter or digit, but not underscore. all non-alphanumeric characters other than\, -, ^ (at the start) and the terminating] are non-special in character classes, but it does no harm if they are escaped.