reagular expression not working in blueprism

#1

Attachments

#5
Hi,

its very simpl code, thats return collection of matches with reg expression:

Start Inputs:
Pattern RegExpression
String

Code Stage:
Inputs: Inputstring, Regexpression
Outputs: RegexMatches
Code: RegexMatches = MultipleMatchRegex(Inputstring, Regexpression);

End Outputs:
RegexMatches

!! Initialise - Global Code - has to be defined with following code: (attach img7)
public DataTable MultipleMatchRegex(string input, string regexpression)
{
DataTable table = new DataTable();
table.Columns.Add("Regex match", typeof(string));
Regex regex = new Regex(regexpression);
foreach (Match match in regex.Matches(input))
{
table.Rows.Add(match.Value);
}
return table;
}

!! Initialise - Code options - must be define as attachment - img8
 

Attachments

Top