Skip to content

Why did I use this knowledge in C++11 regex but The results are not consistent with expectations ? #250

@lin20220125

Description

@lin20220125

such as:
cmatch reMatch;
regex reg("T.*d");
bool ret = regex_match("The car parked in the garage.", reMatch, reg);
if (ret)
{
for (auto index = 1; index < reMatch.size(); ++index)
{
cout << index << " : " << reMatch[index].str() << endl;
}
}
why the ret is false ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions