aboutsummaryrefslogtreecommitdiff
path: root/src/functionregexp.cpp
blob: d1491e617e2862c367e9576a7e7e8777b8629fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "functionregexp.h"
#include "plugger.h"
#include "regexp.h"

PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 );

FunctionRegexp::FunctionRegexp()
{
}

FunctionRegexp::~FunctionRegexp()
{
}

void FunctionRegexp::execute( const StringList &lInput, StringList &lOutput )
{
	if( lParams.size() == 1 )
	{
		RegExp re( lParams.front().c_str() );

		for( StringList::const_iterator i = lInput.begin();
			 i != lInput.end(); i++ )
		{
			if( re.execute( (*i).c_str() ) )
			{
				lOutput.push_back( *i );
			}
		}
	}
	else
	{
	}
}