[mkgmap-dev] regex to remove leading 0
From Felix Hartmann extremecarver at gmail.com on Fri Oct 11 09:39:12 BST 2013
the example doesn#t work: Error: (points:396): Invalid arguments to EQUALS: VALUE (${rcn_ref|subst:^0+~>}) and EXISTS (rcn_ref=*)e: Error: (points:396): Invalid arguments to EQUALS: VALUE (${rcn_ref|subst:^0+~>}) and EXISTS (rcn_ref=*) for command: set rcn_ref='${rcn_ref|subst:^0+~>}' shy ain't it working for rcn_ref? On 07.10.2013 21:04, Steve Ratcliffe wrote: > On 07/10/13 14:05, Felix Hartmann wrote: >> Sorry, for asking this simple question here - but what is the regex >> command to remove a leading 0? > > set ref='${ref|subst:^0~>}' > > Will remove a single leading zero. > > set ref='${ref|subst:^0+~>}' > > will remove any number of leading zeros. Eg 00078 => 78 > > Being able to use regex in the substitution filter is pretty new and > was added by Enrico Liboni in r2664. > > ..Steve
- Previous message: [mkgmap-dev] regex to remove leading 0
- Next message: [mkgmap-dev] regex to remove leading 0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list