Extract Regex Values (Regex Match) in Blue Prism – Stack Overflow

prizm diet

Extract Regex Values (Regex Match) in Blue Prism

In Blue Prism, I need to identify specific elements of a Data Item (text), in order to use the information later in my process.

The text string reads:

REKVISITION_NR: 1234567 Dato: 23-07-2018 Rekvirent: ABC, DEF GHI, JKL 60, 8600 MNO Sted: JKL 60, 8600 MNO, Kl.:14:00:00, Bestilt_tid: 60 min Tolkensnavn: PQR STU Koert_fra: VXY , 8600 Silkeborg Vedr.: Z CPR: 123456-7890 Sprog: Arabisk Type: Personlig fremmøde Godkendt: 24-07-2018

As you can see, each element has these traits (e.g. Kl.:14:00:00 or Sprog: Arabisk):

  • A string name (starting with an uppercase letter)
  • Optionally, a period character (.)
  • A colon character (:)
  • Optionally, a space character ( )
  • The value part of the string
  • A space character ( ), which is followed by the next element.

I believe I should use the Business Object Utility – Strings‘ action Extract Regex Values, but have not sucessfully been able to match any data that can be copied into the Named Values-collection. However, I have found that ([A-Z])\w+\. ?(\w(\d\-)<0,3>)+ brings me some of the way in terms of matching. I want the solution to copy the field names and values into the Named Values collection generated by the action.

Leave a Reply

Your email address will not be published. Required fields are marked *