House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Basic Rules: Sets

  1. Sets
    1. A set is defined using square brackets ([]).
      • [123]
    2. A range is a set which uses a dash to seperate the start of the range and the end.
      • [0-9] = 0-9 inclusive
      • [a-z] = a-z inclusive
    3. To specify a dash in a set it must be the first or last character.
      • [a-z-] = a-z or a dash
    4. A range does NOT loop around. The first item in a range MUST be of a lower ASCII value than the second.
      • [9-1] = error as 9 is after 1 in ascii
    5. to negate a set, have the first character (before a dash) as a carat(^)
      • [^a-z] = Not a-z
      • [^-0-9] = Not a dash or 0-9
    6. any special character that is not special within a set is automatically escaped.
      • [a-z.] = a-z or a period
    7. The only special characters within a range are ^ and -

Designer, Developer and mobile workflow conference