logo separator

[mkgmap-dev] regular expressions in tag tests

From Steve Ratcliffe steve at parabola.me.uk on Tue Jun 5 15:25:33 BST 2012

On 06/05/2012 02:15 PM, Kay F. Jahnke wrote:

> point numbers, in fixed field length with leading spaces, in common RE
> syntax they would be
> '\ *[0-9]+\.00' (optional spaces, followed by a point and two zeroes)

That will work in java regular expressions too, although I don't think 
you need the first '\' character.

> I want to pick out those with '000', '500', '00' and '50' before the
> point (doing contours) - of course a modulo operation on the floating
> point value would also work, but I haven't found that, either...
> How would I specify that in mkgmap? (P.S. I don't know Java, so please
> don't tell me it's in 'standard Java notation' ;-)

I'm not clear exactly what you are trying to match, but if you are 
familiar with other regular expression languages the one in java is very 
similar to the one in Perl 5 and other modern languages.

See a summary of what it is supported and the differences to Perl 5 at: 

If you are not very familiar with regular expressions in any language 
then if you reply with a few examples of what you want to match I can 
probably help out.


More information about the mkgmap-dev mailing list