logo separator

[mkgmap-dev] Problem with regular expression and subst: filter

From Carlos Dávila cdavilam at orangecorreo.es on Fri Apr 7 16:39:34 BST 2017

Thanks for the info. (?i)(?u) did the trick.

El 07/04/17 a las 16:35, Gerd Petermann escribió:
> Hi Carlos,
>
> did not try it, but the docu says for (?i) " By default, case-insensitive matching assumes that only characters in the US-ASCII charset are being matched. Unicode-aware case-insensitive matching can be enabled by specifying the UNICODE_CASE flag in conjunction with this flag."
> This would be (?u).
>
> See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html#CASE_INSENSITIVE
>
> Does that help?
> Gerd
>
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Carlos Dávila <cdavilam at orangecorreo.es>
> Gesendet: Freitag, 7. April 2017 16:26:09
> An: Development list for mkgmap
> Betreff: [mkgmap-dev] Problem with regular expression and subst: filter
>
> I want to add the following rule to my "Latin languages manage system":
> highway=* & name ~ "(?i)Chemin\s+d['’´]+acc[èe]s\s+[àa]\s+la\s+.*" { add
> streettype:movedend="${name|subst:(?i)Chemin\s+d['’´]+acc[èe]s\s+[àa]\s+la\s+~>},
> Chemin d'accès"}
> It catches "Chemin D'Accès à la Piscine" and "Chemin D'Accès A la
> Piscine", but not "Chemin D'Accès À la Piscine" (note the difference in
> à, A or À)
> If I use rule
> highway=* & name ~ "(?i)Chemin\s+d['’´]+acc[èe]s\s+À\s+la\s+.*" { add
> streettype:movedend="${name|subst:(?i)Chemin\s+d['’´]+acc[èe]s\s+À\s+la\s+~>},
> Chemin d'accès"}
> then the third form is caught, but obviously the other ones not. Any
> idea why first rule is not working for all forms?



More information about the mkgmap-dev mailing list