A POSIX character class uses bracket notation inside a Ruby regular expression to match one character from a named class. Forms such as [[:alpha:]], [[:word:]], and [[:digit:]] provide alternatives to explicit bracket lists and can recognize Unicode characters that Ruby's shorthand classes may not. section 11.3.3 section 11.8
Unicode coverage
Ruby's /\w/ does not match the character Ē, but /[[:word:]]/ does. This makes the POSIX form useful when a word-like class must include the relevant Unicode characters. section 11.3.3
>> "\u0112".match(/\w/)
=> nil
>> "\u0112".match(/[[:word:]]/)
=> #<MatchData "Ē">
Compare Ruby's \w shortcut with the POSIX word class in an irb-sized example. section 11.3.3
Available names include :alpha:, :upper:, :lower:, :word:, and :digit:. POSIX classes also have Unicode-property equivalents, such as \p{Alpha} for [[:alpha]]. Detailed property behavior is left for further investigation. section 11.3.3
