How to extract from a column value in datatable of String

UiPath have two exclusive activities to get data through Regular expression.

  1. Use Is Match activity to check whether the required value exists in your string by setting Input in the property as your column value, pattern as “\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}” and set result as a boolean variable to evaluate the existence of the value. (in the image, its set as bIsMatch)
    This step is required because if you directly try to access the element and object is not instantiated, it will lead to exception)
  2. Use if condition to check the existence of the value
  3. If value exists, use Matches activity to get the value by setting Input as your column value, pattern as “\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}” and set a variable for result. The result will be of type IEnumerable (in image RegexResult)
  4. Retrieve required value by accessing the result as
    RegexResult.Cast(of object).FirstOrDefault().ToString.Trim