Many thanks Steve, it's working now. The problem was the operator needing to be ~> instead of =>.
The space after the dot in the pattern was intentional - in my example of "A.B. Street" I did it in two steps, firstly to "A.B Street" and secondly from there to "A B Street". I was doing that because I wanted to avoid double spaces, but now I know that is taken care of later, things are a simpler. Colin On 2014-05-25 12:49, Steve Ratcliffe wrote: > On 25/05/14 11:14, Colin Smale wrote: > >> I am trying to normalise street names by removing any dots. So far I have >> been unable to get the subst function to do what I want. The problem seems >> to be getting the dot to be taken literally in the subst parameters. I have >> tried: a) set newname='${name|subst:. +=> }' > > Originally subst was a straight forward string replacement. So > > ${name|subst:.=> } > > would replace each dot with a space. Also because multiple spaces are > combined into one elsewhere this actually has the effect you want in > this case. > > Regular expressions were added later and you need to use ~> instead > of => to indicate this. So this will work: > > ${name|subst:.+~> } > > It may just be an email formating issue, but in your email there is a > space after the '.'; make sure that there isn't one in your style > file. > > ..Steve > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev@lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev [1] Links: ------ [1] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev