vijayalakshmi deepika wrote:i want to code in java using if conditional statement and match the regular expression...
Even this part of your question is impossible to understand. Could you please stop saying that and try saying something else which people could have a chance at understanding?
You don't use an if-statement to match a regular expression. Not in Java, anyway, and that's what we are talking about here. In Java you have to call some methods to match a regular expression. So your insistence on using an if-statement just makes no sense at all, since that has nothing to do with matching a regex.