View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Help with a Regex Pattern

Ron: Shouldn't the '?' be optional? this would be the space after the first
optional character.

"Ron Rosenfeld" wrote:

On 29 Apr 2007 06:55:01 -0700, wrote:

I have data which is in this format:

J 123 K

The J is optional, could be upper or lower case, and could be a J or
an X or a Z.

It is always followed by a space. The three digits. Then a space.
Then any alphabetic character upper or lower case, but not optional,
the character must be there.


([JjXxZz]\s)?\d{3}\s[A-Za-z]




I am having trouble with the pattern, could someone show me how to set
it up?

tia
bob


--ron