(1) What contents are in /proc/cpuinfo?<br>(2) What are you getting as output when you use this CMake code?<br>(3) What do you expect to get?<br><br><br><br><div class="gmail_quote">On Fri, May 30, 2008 at 12:33 PM, Mathieu Malaterre &lt;<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">regex are driving me nuts... could someone please let me know what is<br>
wrong with my &#39;REPLACE&#39; expression.<br>
<br>
Thanks !<br>
<br>
FILE(READ /proc/cpuinfo cpuinfo)<br>
STRING(REGEX REPLACE &quot;\r?\n&quot; &quot;;&quot; cpuinfo &quot;${cpuinfo}&quot;)<br>
SET(myoutput &quot;&quot;)<br>
<br>
FOREACH(line ${cpuinfo})<br>
 &nbsp;STRING(REGEX MATCH &quot;processor&quot; proc_line ${line})<br>
 &nbsp;STRING(REGEX REPLACE<br>
 &nbsp; &nbsp;&quot;^processor[ ]+:[ ]+([0-9]+)$&quot;<br>
 &nbsp; &nbsp;&quot; \\1 &quot; nline &quot;${line}&quot;)<br>
 &nbsp;IF(proc_line)<br>
 &nbsp;MESSAGE(${nline})<br>
 &nbsp; &nbsp;SET(myoutput &quot;${myoutput}\n${nline}&quot;)<br>
 &nbsp;ENDIF(proc_line)<br>
ENDFOREACH(line)<br>
<br>
MESSAGE(&quot;${myoutput}&quot;)<br>
<font color="#888888"><br>
--<br>
Mathieu<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</font></blockquote></div><br>