CS160

  1. *
    anything, including nothing

    Example A*

    Capital A followed by 0 or more characters
  2. ?
    a single character

    Example: ???

    exactly three characters long
  3. [ ]
    a single character that is one of the characters enclosed in the brackets

    Example [abc]

    a single character that is either a or b or c
  4. [ - ]
    a single character whose value is greater than or equal to 'a' and less than or equal to z (i.e. a lower case character)

    example [a-z]

    Note: uppercase characters have consecutive values, as do lowercase characters, as do digits. However [a-Z] does not do what you want. Use [a-zA-Z] instead.
  5. a character class enclosed inĀ  [ ]
    a single character that is a member of that character class

    Example: [[:alpha:]]

    the character class is alpha. it is indicated by [:alpha:]. the inner brackets indicate the character class. The out brackets indicate the character set (that is a single character) Both sets of brackets are needed.

    Classes include: alpha, upper, lower, digit, alnum, blank, space(whitespace), punct
  6. Classes
    alpha, upper, lower, digit, alnum, blank, space(whitespace), punct
  7. [!a-z]
    ! negates the character set. a single character that is not a member of the set

    [!a-z] a single character whose value is not (greater than or equal to 'a' and less than or equal to 'z') Thus, any character that is not lowercase.
Author
Anonymous
ID
315557
Card Set
CS160
Description
Wildcard commands from the Wildcards sheets in cs160a taught at City College of San Francisco.
Updated