Capitalizing All Words

program textpatterns; # use the given text pattern matching library
sendToMatch (System.in); # select the input to match
match uLetter => "firstLetter" &
      uLetter* => "otherLetters" {
  # "uLetter" is a pattern matching any Unicode letter.
  print (upper => "firstLetter" +
         lower => "otherLetters");
}
match uLetter+ => "nonLetters" {
  print (=> "nonLetter");
}
Beyond OmniMark Sam Wilmott
Slide 27 of 37 www.wilmott.ca