<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
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 ( <br>
(I first only tried opening parentheses so thought it is not working
at all...)<br>
<br>
name ~ '.*\(' { set name='${name|subst:"(=>"}'; echo
"namehasbracket=1" } <br>
name ~ '.*\)' { set name='${name|subst:")=>"}'; echo
"namehasbracket=2" }<br>
<br>
second rule is working, first rule not working...<br>
<br>
<br>
Also not working is:<br>
'.*\Q(\E'<br>
<br>
or <br>
'.*[(]'<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 28.07.2014 11:02, Gerd Petermann
wrote:<br>
</div>
<blockquote cite="mid:DUB112-W11759DF367D76CB6F54229EFB0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Felix,<br>
<br>
the normal escape character is the backslash \.<br>
See also <br>
<a moz-do-not-send="true"
href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html"
target="_blank">http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html</a><br>
<br>
Gerd<br>
<br>
<div>> Date: Mon, 28 Jul 2014 10:33:25 +0200<br>
> From: <a class="moz-txt-link-abbreviated" href="mailto:extremecarver@gmail.com">extremecarver@gmail.com</a><br>
> To: <a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> Subject: [mkgmap-dev] How can I test if "(" or ")" is
part of name<br>
> <br>
> I have a problem that I cannot escape brackets when
trying to find out <br>
> if they are part of the name...<br>
> <br>
> name ~ '.*(' { }<br>
> is not working of course. However ^ is not able to escape
a bracket...<br>
> name ~ '.*^(' { }<br>
> <br>
> <br>
> Is there any way to find out if there is a () in a name?<br>
> (the reason for this is that I want to know in Japan if
the name is only <br>
> in Japanese, or in Japanese (English).<br>
> <br>
> -- <br>
> keep on biking and discovering new trails<br>
> <br>
> Felix<br>
> openmtbmap.org & <a class="moz-txt-link-abbreviated" href="http://www.velomap.org">www.velomap.org</a><br>
> <br>
> _______________________________________________<br>
> mkgmap-dev mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>
> <a class="moz-txt-link-freetext" href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mkgmap-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
<a class="moz-txt-link-freetext" href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
keep on biking and discovering new trails
Felix
openmtbmap.org & <a class="moz-txt-link-abbreviated" href="http://www.velomap.org">www.velomap.org</a></pre>
</body>
</html>