mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
regExp - separate full match from partial match, add find()
- match() only does a full match
- find() and search() do partial matches
search() is similar to the name coming into C++ TR1
This commit is contained in:
@ -62,18 +62,18 @@ int main(int argc, char *argv[])
|
||||
Info<< "true";
|
||||
if (re.ngroups())
|
||||
{
|
||||
Info<< groups;
|
||||
Info<< " groups:" << groups;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "false";
|
||||
if (re.match(str, true))
|
||||
if (re.search(str))
|
||||
{
|
||||
Info<< " partial match";
|
||||
}
|
||||
}
|
||||
Info << endl;
|
||||
Info<< endl;
|
||||
}
|
||||
|
||||
Info<<"test regExp(const char*) ..." << endl;
|
||||
|
||||
Reference in New Issue
Block a user