String Definition by Characters
- Last UpdatedApr 27, 2023
- 1 minute read
Substrings can be extracted from text by following the code word with a substring descriptor of the form:
(Cn1:n2)
where C indicates that n1 and n2 refer to character positions and n1 and n2 are integers that indicate the leftmost and rightmost character positions of the substring respectively; if n1 is omitted then 1 is assumed by default, and if n2 is omitted then the last character of the string is assumed. For example:
If #PIPE expands to ‘/ZONE-4/PIPE-6’ then #PIPE(C2:6)
expands to ‘ZONE-’
By default all AVEVA E3D Design names are output with the initial slash. If you do
#PIPE(C2:) expands to ‘ZONE-4/PIPE-6’