<div dir="ltr">Linus doesn't appear to have REG_ENHANCED. </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 3:37 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The code below fails to match the string "a" to the regex "^a$" on MacOSX if both "REG_EXTENDED | REG_ENHANCED" are specified, but it will pass if just REG_ENHANCED is used.<br>
<br>
Can someone run this on linux to see if the code below fails as well on linux? I want to make sure it isn't just an old version of regex we have in our libc...<br>
<br>
<br>
<br>
#include <stdio.h><br>
#include <stdint.h><br>
#include <regex.h><br>
<br>
#define DEFAULT_REG_FLAGS (REG_EXTENDED | REG_ENHANCED)<br>
<br>
int main (int argc, char const *argv[], char const *envp[])<br>
{<br>
regex_t re;<br>
const char *regex_input = "a";<br>
int err = regcomp (&re, "^a$", DEFAULT_REG_FLAGS);<br>
if (err == 0)<br>
{<br>
err = regexec (&re, regex_input, 0, NULL, DEFAULT_REG_FLAGS);<br>
if (err == 0)<br>
{<br>
puts("matched");<br>
}<br>
else<br>
{<br>
char error_str[2048];<br>
const size_t actual_error_str_size = regerror(err, &re, error_str, sizeof(error_str));<br>
puts(error_str);<br>
}<br>
}<br>
return 0;<br>
}<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</blockquote></div><br></div>