Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    perlrecharclass 5.9.5

    Download button

    No screenshots available
    Downloads: 456  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Perl Team | More programs
    Perl Artistic License / FREE
    July 20th, 2007, 00:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    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 dot

    The 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 sequences

    Perl 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.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    regular expression | character classes | Perl module | perlrecharclass | regular | expression

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM