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.
I'm going to guess that you did something like this:
Note that \ is an escape character in Javastring literals. You know: \n means linefeed, \r means carriage return, \t means tab and so on. If you want to have a backslash in a string, you have to make it a double backslash, otherwise Java is going to interpret the backslash and the following character as an escape sequence, and \S, \P and \M are not valid escape sequences.