Basic HTML version of Foils prepared March 30 97

Foil 36 Regular Expressions --Patterns
(Chapter 7 of the Llama Book)

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


1 Simple Single-character Patterns are :
  • Single explicit character eg a
  • dot . which matches ANY character except newline \n
2 Character class is a Single-character Patterns and represented as a set [c1c2c3...cN] which matches any one of the listed characters
  • [ABCDE] matches A B C D or E
  • [0-9] is same as [0123456789]
  • [a-zA-Z] matches any lower or upper case letter
3 Negated character class is represented by a carat ^ after left [ square bracket
  • [^0-9] matches any character which is NOT
    • a digit 0 1 2 3 4 5 6 7 8 9

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 Sat Sep 6 1997