We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 9 Next »

The Contains Condition can be used to check whether string, variable value or file content contains a given pattern.

The pattern can be a plain string or a regular expression.

Usage

Example:

The Contains  condition has been introduced in IzPack 5.0.

 Nested Elements

<string>

A source string where to look up the pattern.

Variable substitution takes places before the string is processed by the condition.

Optional, one of the elements <string>, <variable> or <file> must be given to deliver a source for parsing.

<variable>

A variable name, the pattern is looked up in the variable's value.

Optional, one of the elements <string><variable> or <file> must be given to deliver a source for parsing.

<file>

A text file name, the pattern is looked up in the file's content.

Variable substitution takes places before the file name is processed by the condition.

Optional, one of the elements <string><variable> or <file> must be given to deliver a source for parsing.

Be aware that the given file is opened and parsed quite many times during an installation process each time conditions get to be evaluated, to not slow down the installation process that much.

<value>

The substring or regular expression to look up in the contents.

A value must be given in each case.

Attributes:

NameRequiredDefault ValueDescription

byLine

notrue

Whether to look up an entry on each line separately or just on a compact content.

This makes sense especially for file contents and regular expression patterns, but applies on all combinations of sources.

caseInsensitive

nofalseWhether to look up case-insensitive.

regex

nofalseWhether the value should be considered a Java regular expression pattern for looking up a content.

 

 

  • No labels