<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"BMW Group Light";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Thanks! <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">I’ll take away the message that it is indeed not possible and I didn’t miss anything there.
</span><span lang="EN-US" style="font-family:Wingdings;color:#1F497D">J</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Daniel<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"BMW Group Light";color:#1F497D">--
<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"BMW Group Light";color:#1F497D">BMW Car IT GmbH</span></b><span style="font-size:12.0pt;font-family:"BMW Group Light";color:#1F497D"><br>
Daniel Lüken<br>
Spezialist Entwicklung<br>
Moosacher Straße 86<br>
80809 München<br>
<br>
Tel.: ­+49-89-189311-35<br>
Fax: +49-89-189311-20<br>
Mail: <a href="mailto:daniel.lueken@bmw-carit.de"><span style="color:blue">daniel.lueken@bmw-carit.de</span></a><br>
Web: <a href="http://www.bmw-carit.de/"><span style="color:blue">http://www.bmw-carit.de</span></a><br>
-------------------------------------------------------------------------<br>
BMW Car IT GmbH<br>
Geschäftsführer: Kai-Uwe Balszuweit und Alexis Trolin<br>
Sitz und Registergericht: München HRB 134810<br>
-------------------------------------------------------------------------</span><span style="color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Roman Wüger [mailto:roman.wueger@gmx.at]
<br>
<b>Sent:</b> Monday, May 08, 2017 11:16 PM<br>
<b>To:</b> Daniel Lueken <Daniel.Lueken@bmw-carit.de><br>
<b>Cc:</b> cmake@cmake.org<br>
<b>Subject:</b> Re: [CMake] CMake regexes: Case insensitive and whitespace matching<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello Daniel,<span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I tried it also in various ways, but I think the Regex in Cmake is very limited. What has worked for me was to use try_run and implement a simple c++ application which uses C++11's <regex> and accept one or two command line arguments (~
 15 lines of code).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Hope it helps<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Regards Roman<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Am 08.05.2017 um 15:19 schrieb Daniel Lueken <<a href="mailto:Daniel.Lueken@bmw-carit.de">Daniel.Lueken@bmw-carit.de</a>>:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Is there any way to do case insensitive matching in string(REGEX … ?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Also, is there a way to match whitespaces?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">What I would like to do, speaking in Perl-like syntax, is something like</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">string(REGEX REPLACE “/something\s+/stuff/i” …</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Not knowing how to do this, I am currently doing something along the lines of</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">string(REGEX REPLACE “[Ss][Oo][Mm][Ee][Tt][Hh][Ii][Nn][Gg][\\r\\n\\t ]+” …
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">which looks pretty wrong to me. Converting everything to upper or lower case is also not an option since parts of the input string in which I need to replace something are case sensitive.</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Best regards</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Daniel Lueken</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"BMW Group Light";color:#1F497D">--
</span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"BMW Group Light"">BMW Car IT GmbH</span></b><span style="font-size:12.0pt;font-family:"BMW Group Light""><br>
Daniel Lüken<br>
Spezialist Entwicklung<br>
Moosacher Straße 86<br>
80809 München<br>
<br>
Tel.: ­+49-89-189311-35<br>
Fax: +49-89-189311-20<br>
Mail: <a href="mailto:daniel.lueken@bmw-carit.de"><span style="color:blue">daniel.lueken@bmw-carit.de</span></a><br>
Web: <a href="http://www.bmw-carit.de/"><span style="color:blue">http://www.bmw-carit.de</span></a><br>
-------------------------------------------------------------------------<br>
BMW Car IT GmbH<br>
Geschäftsführer: Kai-Uwe Balszuweit und Alexis Trolin<br>
Sitz und Registergericht: München HRB 134810<br>
-------------------------------------------------------------------------</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">--
<br>
<br>
Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">
http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake">http://public.kitware.com/mailman/listinfo/cmake</a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</body>
</html>