Previous

Next


31. Metacharacters - The Final Review

  • At last! We're done with metacharacters. Now we know all about:
    1. Use of [ and ] to create character classes
    2. Using ^ and - inside character classes to negate the class, or create a range
    3. Use of | to provide alternation
    4. Use of ( and ) or \( and \) to limit the scope of alternation
    5. Use of ^ and $ to match the beginning and the end of a line
    6. Use of . to match "any" character
    7. The ?, *, + and {min, max} quantifiers
  • And also:
    1. Use of \ to escape metacharacters
    2. Using grouping to apply quantifiers to a sequence of literals
    3. Using grouping to access backreferences with \1, \2, ... or $1, $2, ...
    4. Using \< and \> or \b and \B to match word boundaries
    5. A bunch of Perl and POSIX specific metasequences

Previous

Next

Andrew Hill

For LinuxSA Meeting, 21 November 2000