On Tue, May 27, 2014 at 12:03:15AM +0200, José Carlos Andreu Galán wrote:
> -             regExp = QString("(\\d+)[" UTF8_DEGREE 
> "\\s](\\d+)[\'\\s](\\d+)([,\\.](\\d+))?[\"\\s]([NS%1%2])"
> -                              "\\s*(\\d+)[" UTF8_DEGREE 
> "\\s](\\d+)[\'\\s](\\d+)([,\\.](\\d+))?[\"\\s]([EW%3%4])")
> +             regExp = QString("(\\d+)[" UTF8_DEGREE 
> "\\s]\\s*(\\d+)([\'\\s]|\'\\s*)(\\d+)([,\\.]"

same issue, just moved down the line...

([\'\\s]|\'\\s*) is overkill

* allows zero or more
so simply do

[\'\\s]\\s*

that saves you the group and makes the regex easier to read

/D
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to