logo separator

[mkgmap-dev] How can I test if "(" or ")" is part of name

From Felix Hartmann extremecarver at gmail.com on Mon Jul 28 10:15:40 BST 2014

Well that's what I thought too... - so I tried many many possibilities. 
However the strange this is - now that you said it and I tried it again. 
It only works for ) , not for (
(I first only tried opening parentheses so thought it is not working at 
all...)

name ~ '.*\(' { set name='${name|subst:"(=>"}'; echo "namehasbracket=1" }
name ~ '.*\)' { set name='${name|subst:")=>"}'; echo "namehasbracket=2" }

second rule is working, first rule not working...


Also not working is:
'.*\Q(\E'

or
'.*[(]'




On 28.07.2014 11:02, Gerd Petermann wrote:
> Hi Felix,
>
> the normal escape character is the backslash \.
> See also
> http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
>
> Gerd
>
> > Date: Mon, 28 Jul 2014 10:33:25 +0200
> > From: extremecarver at gmail.com
> > To: mkgmap-dev at lists.mkgmap.org.uk
> > Subject: [mkgmap-dev] How can I test if "(" or ")" is part of name
> >
> > I have a problem that I cannot escape brackets when trying to find out
> > if they are part of the name...
> >
> > name ~ '.*(' { }
> > is not working of course. However ^ is not able to escape a bracket...
> > name ~ '.*^(' { }
> >
> >
> > Is there any way to find out if there is a () in a name?
> > (the reason for this is that I want to know in Japan if the name is 
> only
> > in Japanese, or in Japanese (English).
> >
> > --
> > keep on biking and discovering new trails
> >
> > Felix
> > openmtbmap.org & www.velomap.org
> >
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

-- 
keep on biking and discovering new trails

Felix
openmtbmap.org & www.velomap.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140728/563e06fe/attachment-0001.html>


More information about the mkgmap-dev mailing list