Basic HTML version of Foils prepared Sept 20 97

Foil 39 Predefined Character Classes in Regular Expressions

From Tutorial on PERL Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


1 \d digits [0-9]
2 \D NOT digits [^0-9]
3 \w word characters [a-zA-Z0-9_]
  • Really anything legal in a PERL variable name
  • Note \b indicates break between \w and \W
4 \W NOT word chars [^a-zA-Z0-9_]
5 \s Whitespace [ \r\t\n\f]
6 \S NOT whitespace [^ \r\t\n\f]

in Table To:


© 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 Sun Sep 21 1997