This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Originally posted by P Bala: Oh... Thanks Henry. I was wanting to include space, dash(-),@,#,$ signs. I want to exclude !,^, (),<>,;,:,* and words like (SELECT),(TABLE). I seek help in framing such a regular expression.
I sincerely thank you in advance.
If you want the dash as a literal character, and not as a range designator, then you have two choices. You can escape it with a backslash. Or you can make it the first or the last character between the square brackets -- as it can't be a range designator when there isn't a range.