
18 Feb
2005
18 Feb
'05
1:55 p.m.
Why can I not construct a regex of the form: "|abc" (throws exception based on REG_EMPTY) for use with regex_match, if I want to match either "abc" or the empty string "". I understand thatn in a regex_search the empty string would always match (per Perl like semantics), and abc would never be considered. But, I want to use this with regex_match, where the empty string would have to match the entire string being searched. Work arounds such as "(?:)|abc" and "^$|abc" seem to get around this deficiency, but I am wondering why it is there in the first place. Thanks, Michael Goldshteyn