logo separator

[mkgmap-dev] Need help with Regex Substition

From Felix Hartmann extremecarver at gmail.com on Sun Jun 22 13:10:53 BST 2014

Hi all,

1.
well the regex commands are a bit too difficult to understand for me. So 
I would need some practical help..
So I have the following
a)Key="420 m"
b)Key="420m"
c)Key="420"
d)Key="420ft"

I want it to return number only in Key3, and number plus uni in Key2.  I 
assume if no unit is given in value, value is "m"

so I would like to end up with
a)Key2=420m  and Key3=420
b)Key2=420m and Key3=420
c)Key2=420m and Key3=420
d)Key2=420ft and Key3=128.016

So I would first need to filter out ft - and then use 
${Key|height:"ft=>m"} and set Key2=valueft
then filter out the space for a) leave b) intact, and add m to c)...


2. I'm not sure if this is possible. But I would like to remove part of 
a key.
So I have e.g.
AT:source:maxspeed=
DE:source:maxspeed=
ITA:source:maxspeed=

and I want to test for source:maxspeed=
However I think
*:source:maxspeed=
is not a working command. So is it possible to simply remove anything 
before source:maxspeed in the key?


-- 
keep on biking and discovering new trails

Felix
openmtbmap.org & www.velomap.org



More information about the mkgmap-dev mailing list