https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291172

--- Comment #2 from Gleb Popov <[email protected]> ---
(In reply to Konstantin Belousov from comment #1)
> 1. '+' must not be escaped by backslash, it becomes ordinary character to 
> match
> 2. '+' only works as metasymbol for extended regexps, so you need REG_EXTENDED

According to
https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions
when working in REG_BASIC mode one should use '\+' and it works just like '+'
in REG_EXTENDED.

> BTW, why did you specified literal 4 as flag for regexec?

It was a remnant of my experimentation when comparing to grep. grep passes 4 as
eflags when calling regexec. Let me reupload the test program.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to