reagular expression not working in blueprism

ravi teja kuna

New Member

Attachments

  • 1565951176234.png
    12.5 KB · Views: 17

JackT

New Member
I believe you need to pass the collection with proper data inside as below

test action:
1566197892826-png.4468

init:
1566197838716-png.4466

result:
1566197863967-png.4467


Cheers,
Jack
 

Attachments

  • 1566197838716.png
    8.5 KB · Views: 31
  • 1566197863967.png
    9 KB · Views: 31
  • 1566197892826.png
    8.6 KB · Views: 31
Last edited:

Jan Čech

New Member
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

  • img1.png
    48 KB · Views: 8
  • img2.png
    17.5 KB · Views: 8
  • img3.png
    17.5 KB · Views: 8
  • img4.png
    16.6 KB · Views: 9
  • img5.png
    15 KB · Views: 8
  • img6.png
    16.6 KB · Views: 7
  • img7.png
    17.8 KB · Views: 7
  • img8.png
    13.7 KB · Views: 6
Top