Thursday, October 4, 2007

Regular Expression

space or boundary(next line) :
(\\s+\\b?)

To make optional : regular expression followed by "question mark" i.e. (regex?)

Example
string strPattern = "aaa(b?)ccc"
Matches "aaaccc" and "aaabccc" both