in reply to Re: Help composing Regex for matching only Titlecase words
in thread Help composing Regex for matching only Titlecase words

Both you and fidesachates use stingy matching (that is, using ? as a secondary quantifier). I wonder why, as it's kind of pointless.
  • Comment on Re^2: Help composing Regex for matching only Titlecase words

Replies are listed 'Best First'.
Re^3: Help composing Regex for matching only Titlecase words
by CountZero (Bishop) on Mar 06, 2011 at 17:04 UTC
    You are right. It is not necessary. A space is neither upper, nor lowercase and therefore will limit the run of the regex.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James