You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

To split flat file record fields, you can also use regex patterns. However, you need deeper knowledge of regex patterns to use this approach.

Example File (Builder project Add-ons/FlatFiles):

<your example path>\Add-ons\FlatFile\uml\flatFilePattern.xml

Look at the example flat file below. It contains a list of URLs.

Figure: Flat File With URLs

By specifying an Attribute Pattern on the flat file record, you can split the records e.g. into

  • protocol
  • delimiter
  • host
  • port
  • path

Figure: Class Diagram of a Flat File Using Pattern

The pattern to split the record with is:

^(.*?)(://)([A-Za-z0-9.]+)(:[0-9]+)*(/*.*)$

Each group delimited with brackets represents an record field (class attribute).

  • No labels