ENH: add wordRes::matching() method
- returns indices of matching entries.
This commit is contained in:
@ -54,9 +54,9 @@ bool Foam::functionEntries::removeEntry::execute
|
||||
Istream& is
|
||||
)
|
||||
{
|
||||
const List<keyType> patterns = functionEntry::readStringList<keyType>(is);
|
||||
const wordRes patterns(functionEntry::readStringList<wordRe>(is));
|
||||
|
||||
for (const keyType& key : patterns)
|
||||
for (const wordRe& key : patterns)
|
||||
{
|
||||
if (key.isLiteral() && key.find('/') != string::npos)
|
||||
{
|
||||
@ -72,7 +72,7 @@ bool Foam::functionEntries::removeEntry::execute
|
||||
{
|
||||
// Remove by pattern
|
||||
const wordList dictKeys = parentDict.toc();
|
||||
const labelList indices = findStrings(regExp(key), dictKeys);
|
||||
const labelList indices = findStrings(key, dictKeys);
|
||||
|
||||
for (const auto idx : indices)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user