Uploaded image for project: 'Providence'
  1. PROV-2836

Allow back references generated by data importer applyRegularExpressions option to be used in formatting templates

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 1.7
    • Fix versions: 1.7.9
    • Components: Data importer
    • Labels:
      None

      Description

      The "applyRegularExpressions" option in the importer is used to rewrite data values prior to import. In the replacement string back references may be used in the standard way. Eg.

      {
      "applyRegularExpressions": [{
      "match": "([A-Za-z\\s\\pZ\\pC]+?)[\\s]*\\(([\\d]+)\\).*$" }],"replaceWith":"\\1"
      }

      would rewrite the value to be imported from the first parenthesized match.

      However, there's no way to use these back references outside of the applyRegularExpressions match/replaceWith construct. In particular, when specifying splitters there's no way to use back references, so one is limited to using the rewritten value only.

      We should change this such that applyRegularExpressions can be used to perform a match that generates back references. Rewriting the data value with replaceWith should become optional. Back references would be useable through the tag for the data value suffixed with a colon and back reference number. For example, if importing ^6, back references would be accessible via ^6:1, ^6:2, ^6:3, etc.

        Attachments

          Activity

            People

            • Assignee:
              Seth
              Reporter:
              Seth
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: