Hi Michele,

 

Thanks for your response. I have tried many combinations using [] but the 
problem still exists. Could you give me the answer to this case?  I have no 
clue of the definition of groups, ^.\,?,[ etc. regarding formatting in here.

 

Regards,

Anthony
 
> Date: Mon, 24 May 2010 01:39:21 -0700
> Subject: [java ee programming] Re: formatting syntax for lab 
> 4210-struts-validator
> From: migat...@gmail.com
> To: java-ee-j2ee-programming-with-passion@googlegroups.com
> 
> 
> 
> On May 24, 10:20 am, Anthony Lam <anthonycklamp...@hotmail.com> wrote:
> > Hi,
> >
> > I am seeking for the right syntax for formatting the phone number into the 
> > required format (xxx)xxxxxx (example: (123)676666 for lab 
> > 4210-struts-validator exercise.
> >
> > I tried ^\(?(\d{3})\)?(\d{6})$ as the formatting string, but the end result 
> > is skipping either left and right bracket in the input still pass the 
> > validation rule.
> >
> > Pls also advise where can I find the detailed explaination of the 
> > formatting string syntax rule.
> Try to use [] groups instead of escaping and {n} outside of the group
> instead of inside of the group.
> 
> Michèle
> 
> Michèle
> >
> > Thanks in advance.
> >
> > Regards,
> >
> > Anthony
> >
> > _________________________________________________________________
> > Your E-mail and More On-the-Go. Get Windows Live Hotmail 
> > Free.https://signup.live.com/signup.aspx?id=60969
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Java EE (J2EE) Programming with Passion!" group.
> > To post to this group, send email to
> > java-ee-j2ee-programming-with-passion@googlegroups.com
> > To unsubscribe from this group, send email to
> > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
> > For more options, visit this group 
> > athttp://groups.google.com/group/java-ee-j2ee-programming-with-passion?...
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Java EE (J2EE) Programming with Passion!" group.
> To post to this group, send email to
> java-ee-j2ee-programming-with-passion@googlegroups.com
> To unsubscribe from this group, send email to
> java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
                                          
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969

-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to