Sorry, but this strays a little from actual boost.  Since there are a handful of you that are probably using regex, I was hoping someone could help with syntax.

I have a regex that validates a latitude format.

 

These are the restrictions:

Must have an N or S as first letter.

It can be all values from 0.0 to 90.0

My first shot at it confirmed format, but not data constraints:  "(N|S)\\d{2}\\.\\d{1,6}"

 

 

But any attempts to limit the constraints caused an exception in regex.  Is there something wrong w/ how I formatted this: "(N|S)(9[0]\\.0{1-6}|[0-8]\\d\\.\\d{1-6})"

 

To me, it reads:  1st char must be N|S

If second char is 9, the next chars must be 0.0 through 0.000000

Else

If char is 0-8, then the next just has to be digits [0-9].[0-9]{1-6}

 

Can anyone tell me what I am doing wrong? 

Just FYI, I am coding in VS 2005 C++


Thanks