blob: 86378fb5c68a3828e8d52134da93195c775e7500 [file] [log] [blame]
{
"classLoaderSharing" : "workflow",
"script" : "import java.util.regex.*;\n\nfilteredlist = new ArrayList();\nPattern thePat = Pattern.compile(regex);\nint theGroup = Integer.parseInt(group);\n\nfor (Iterator i = stringlist.iterator(); i.hasNext();) {\n\tString item = (String) i.next();\n\tMatcher matcher = thePat.matcher(item);\n\n\tif (matcher.find()) {\n\t\tfilteredlist.add(matcher.group(theGroup));\n\t}\n}\n",
"localworkerName" : "org.embl.ebi.escience.scuflworkers.java.RegularExpressionStringList",
"inputPorts" : [ {
"name" : "stringlist",
"depth" : 1,
"type" : "String"
}, {
"name" : "regex",
"depth" : 0,
"type" : "String"
}, {
"name" : "group",
"depth" : 0,
"type" : "String"
} ],
"outputPorts" : [ {
"name" : "filteredlist",
"depth" : 1,
"granularDepth" : 1
} ],
"isAltered" : false
}