CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2008
    Posts
    23

    Regular Expression for one embedded space and forced upper cases?

    HI!
    I want to write a regular expression which may enforce input in upper case and one embedded space e.g I want to give me input as "M23 9RQ". So please help me the regular expression for this input or some other better solution like customer validator etc.
    Thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Regular Expression for one embedded space and forced upper cases?

    From what you mention - then off the top of my head, I'd say something along this line:

    Code:
    [A-Z]([A-Z ]+[A-Z])?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured