aboutsummaryrefslogtreecommitdiff
path: root/src/functionregexp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/functionregexp.cpp')
-rw-r--r--src/functionregexp.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/functionregexp.cpp b/src/functionregexp.cpp
index 462e93c..d1491e6 100644
--- a/src/functionregexp.cpp
+++ b/src/functionregexp.cpp
@@ -1,5 +1,6 @@
1#include "functionregexp.h" 1#include "functionregexp.h"
2#include "plugger.h" 2#include "plugger.h"
3#include "regexp.h"
3 4
4PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 ); 5PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 );
5 6
@@ -13,5 +14,21 @@ FunctionRegexp::~FunctionRegexp()
13 14
14void FunctionRegexp::execute( const StringList &lInput, StringList &lOutput ) 15void FunctionRegexp::execute( const StringList &lInput, StringList &lOutput )
15{ 16{
17 if( lParams.size() == 1 )
18 {
19 RegExp re( lParams.front().c_str() );
20
21 for( StringList::const_iterator i = lInput.begin();
22 i != lInput.end(); i++ )
23 {
24 if( re.execute( (*i).c_str() ) )
25 {
26 lOutput.push_back( *i );
27 }
28 }
29 }
30 else
31 {
32 }
16} 33}
17 34