perlrecharclass

perlrecharclass package contains Perl regular expression character classes.
Download

perlrecharclass Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Perl Team
  • Publisher web site:
  • http://search.cpan.org/~jhi/perl-5.8.1/ext/Encode/lib/Encode/PerlIO.pod

perlrecharclass Tags


perlrecharclass Description

perlrecharclass package contains Perl regular expression character classes. perlrecharclass package contains Perl regular expression character classes.The top level documentation about Perl regular expressions is found in perlre.This manual page discusses the syntax and use of character classes in Perl Regular Expressions.A character class is a way of denoting a set of characters, in such a way that one character of the set is matched. It's important to remember that matching a character class consumes exactly one character in the source string. (The source string is the string the regular expression is matched against.)There are three types of character classes in Perl regular expressions: the dot, backslashed sequences, and the bracketed form.The dotThe dot (or period), . is probably the most used, and certainly the most well-known character class. By default, a dot matches any character, except for the newline. The default can be changed to add matching the newline with the single line modifier: either for the entire regular expression using the /s modifier, or locally using (?s).Here are some examples: "a" =~ /./ # Match "." =~ /./ # Match "" =~ /./ # No match (dot has to match a character) "n" =~ /./ # No match (dot does not match a newline) "n" =~ /./s # Match (global 'single line' modifier) "n" =~ /(?s:.)/ # Match (local 'single line' modifier) "ab" =~ /^.$/ # No match (dot matches one character)Backslashed sequencesPerl regular expressions contain many backslashed sequences that constitute a character class. That is, they will match a single character, if that character belongs to a specific set of characters (defined by the sequence). A backslashed sequence is a sequence of characters starting with a backslash. Not all backslashed sequences are character class; for a full list, see perlrebackslash.Here's a list of the backslashed sequences, which are discussed in more detail below. d Match a digit character. D Match a non-digit character. w Match a "word" character. W Match a non-"word" character. s Match a white space character. S Match a non-white space character. h Match a horizontal white space character. H Match a character that isn't horizontal white space. v Match a vertical white space character. V Match a character that isn't vertical white space. pP, p{Prop} Match a character matching a Unicode property. PP, P{Prop} Match a character that doesn't match a Unicode property. Requirements: · Perl


perlrecharclass Related Software