Match Strings
Match strings are special strings in the control file which are replaced by a user defined replacement string during processing of the control file. (A string is a sequence of characters.) These strings may be defined on the MAPPLOT command line, or by using the RPLS and RPLV commands within a control file.
A match string definition has two parts — the match string and the replacement string. When defined on the command line, the match string must be framed by periods, and the periods are considered part of the string. When defined using the RPLS or RPLV command, the match string may be any sequence of characters. Match strings may not have enclosed spaces or punctuation. For example, consider the following four line control file:
ANOX ,,,,,,.ts.,,,,,,.o.
RPLS %1,10
TEXT 1,%1.2,-1, "Fredericton N.B."
This contains match strings .m., .ts., .o. and %1.
The following command line would set the replacement strings used in the previous example:
This command is equivalent to a control file that uses replacement strings:
RPLS .ts.,"0"
RPLS .o., "1.5"
MDFF .m.
ANOX ,,,,,,.ts.,,,,,,.o.
RPLS %1, 10
TEXT 1,%1,2,-1,"Fredricton N.B."
In both cases, the control file that would be processed would look like:
ANOX ,,,,,,0,,,,,,1.5
TEXT 1,10,2,-1,"Fredricton N.B."
If a match string has not been assigned a replacement, it is removed from the line before processing provided it is framed by dots. The only exception to this is when a match string is enclosed within double quotes. In the example above, the .B. match string is not removed. This prevents removing abbreviations from text strings. However, if the abbreviation does coincidentally have a replacement string, then it will be replaced.
Using match strings, default control files can be created which set most parameters to constant values, and use match strings to set parameters that vary from run to run.
Got a question? Visit the Seequent forums or Seequent support
© 2023 Seequent, The Bentley Subsurface Company
Privacy | Terms of Use