[logo] Code Crusader
   
Home     
* Cart

Introduction

Demo

Features
    Overview

    Languages

    Project

    Version Control

    Editor

    OOP

    Documentation

    API's

    Miscellaneous

    Known bugs

    Next release
    Future plans

    Projects

Screenshots

Who uses it

FAQ

Other software

Log in  

   
      
  license(s) for 
Code Crusader IDE provides a great value and includes both Code Crusader and Code Medic!
     

Regex Quick Reference

Matching

Characters and classes

  .             Any single character
  []            Character class (see below)

  \t            Horizontal tab
  \n            Newline
  \r            Carriage return (cannot be typed in the Code Crusader text editor)
  \f            Form feed (cannot be typed in the Code Crusader text editor)
  \v            Vertical tab (cannot be typed in the Code Crusader text editor)

  \w            Word character:     [a-zA-Z0-9_]
  \W            Non-word character: [^a-zA-Z0-9_]

  \s            Whitespace character:     [ \t\n\r\f\v]
  \S            Non-whitespace character: [^ \t\n\r\f\v]

  \d            Decimal digit: [0-9]
  \D            Non-digit:     [^0-9]

Quantifiers

  ?             Zero or one occurrence
  *             Zero or more occurrences
  +             One or more occurrences
  {min,max}     At least min and at most max occurrences
  {n}           Exactly n occurrences
  {min,}        At least min occurrences

Other

  x|y           Alternation: either x or y
  (...)         Grouping and subexpression capturing

  ^             The beginning of a line
  $             The end of a line

  \<            The beginning of a word
  \>            The end of a word

Oddities

  ()            Enclosing nothing, the null string
  {             If not followed by a number, matches itself.

Character Classes

  -             Between two characters, indicates a range.
                As the first character after any '^', the last
                character, or the second endpoint of a range,
                matches itself. ([.-.] can be used as the first
                endpoint of a range.)

  ^             As the first character, complements the set.
                Otherwise, matches itself.

  [             Matches itself, since classes don't nest.

  ]             As the first character after any ^, matches itself.
                Otherwise, ends the character class.

  [:alnum:]     [A-Za-z0-9]
  [:alpha:]     [A-Za-z]
  [:blank:]     Space or tab
  [:cntrl:]     Any control character
  [:digit:]     [0-9]
  [:graph:]     Any printable character except space
  [:lower:]     [a-z]
  [:print:]     Any printable character including space
  [:punct:]     Any printable character except [^ A-Za-z0-9]
  [:space:]     Space, tab, newline, carriage return, form feed, vertical tab
  [:upper:]     [A-Z]
  [:xdigit:]    Any hexadecimal digit: [0-9A-Fa-f]

  [= =]         POSIX character equivalent
  [. .]         POSIX collating sequence

  [[:<:]]       Pseudo-POSIX word beginning
  [[:>:]]       Pseudo-POSIX word ending

Replacement

  $0            The overall match
  $N            The Nth parenthesized subexpression, counting '('s from the left
  $-N           The Nth subexpression counting '('s from the right
  \$            Literal dollar character

Copyright © 2008 New Planet Software