in reply to pattern matching whitespace
Where x? matchs 0 or 1 x, and x{n,m} matches between n and m x's, inclusive. A couple general comments.. -- it's more robust (maybe not necessary for your task) to not use just a "." when the posible characters are known. for example, match "/20\d\d/" instead of "/200../" and "/^a-zA-Z{3} /" instead of "/^..../" (or even "/^(?:Mon|Tue) /" type of thing)./( | )/ / ?/ / {1,2}/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: pattern matching whitespace
by tcf03 (Deacon) on Apr 13, 2005 at 17:25 UTC | |
by ikegami (Patriarch) on Apr 13, 2005 at 19:37 UTC |