Java will treat \ inside a string as starting an escape sequence Make sure you use \ instead (so that you get an actual \ character in the string) and you should be ok Quick Update: As Etienne points out, if you actually want a \ in the RegEx itself, you'll need to use \\, since that will produce \ in the string, which will produce \ in the RegEx Your regex after correction: String regEx ="^(01-9|1012)- /.(01-9|120-9|301)- /.(19|20)\\d{2}$.
Java will treat \ inside a string as starting an escape sequence. Make sure you use \ instead (so that you get an actual \ character in the string) and you should be ok. Quick Update: As Etienne points out, if you actually want a \ in the RegEx itself, you'll need to use \\, since that will produce \ in the string, which will produce \ in the RegEx.
Your regex after correction: String regEx ="^(01-9|1012)- /.(01-9|120-9|301)- /.(19|20)\\d{2}$.
Thanks ..its working..what should I do if I have to make 1/2/2011 also as valid date. – XYZ Oct 14 at 7:31 got it..dont bother..thanks for the reply.. – XYZ Oct 14 at 7:34.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.