Basic HTML version of Foils prepared March 30 97

Foil 38 Predefined Character Classes in Regular Expressions
(Chapter 7 of the Llama Book)

From PERL4 Tutorial for CPS616 Computational Science for Information Age Course CPS616 -- February 1995. by Geoffrey C. Fox


\d digits [0-9]
\D NOT digits [^0-9]
\w word characters [a-zA-Z0-9_]
  • Really anything legal in a PERL variable name after $ % @ indicators of a variable
  • Note \b indicates break between \w and \W
\W NOT word characters [^a-zA-Z0-9_]
\s White Space [ \r\t\n\f]
\S NOT white space [^ \r\t\n\f]



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Sep 6 1997