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: [email protected] ; '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:[email protected]]
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
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev