logo separator

[mkgmap-dev] Testing for a literal question mark

From Walter Schlögl Walter.Schloegl-Resch at aon.at on Wed Mar 18 21:16:25 GMT 2015

I am checking, if names only include ? and delete it with this rule

name~'^(?=\s*\?)[?\s]+$'            { delete name }

Maybe it’s helpfull even if you are looking for a different solution.

Walter

From: Mike Baggaley 
Sent: Wednesday, March 18, 2015 4:53 PM
To: daveswarthout at gmail.com ; 'Development list for mkgmap' 
Subject: Re: [mkgmap-dev] Testing for a literal question mark

Hi Dave, I have a rule based on the following that includes a test for a question mark, and it seems to work fine:

 

alt_name~'.*[!"$%\^&*_+=\[\]{}:;@~#<>,?/|\\].*' {echotags "Road with invalid character in alt_name"; delete alt_name}

 

So I expect you should be able to put ~’.*[?].*’ as the test if the question mark is not accepted outside the square brackets.

 

Regards,

Mike

 

From: Dave Swarthout [mailto:daveswarthout at gmail.com] 
Sent: 18 March 2015 14:28
To: Development list for mkgmap
Subject: [mkgmap-dev] Testing for a literal question mark

 

How would I write a regex style rule that fires when it encounters a question mark in a name?

 

There is a group of local mappers that have used an invented name of "Ban ?" for towns they do not know the name of. I want to set the name to something more meaningful but I can't seem to discover a way to escape the ? without crashing mkgmap.


 

-- 

Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com



--------------------------------------------------------------------------------
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150318/42dda887/attachment.html>


More information about the mkgmap-dev mailing list