Page History
...
replaceAll( string: String, regex: String, replacement: String)
dagegen würde$1
der Ausdruckssprache verwenden und nicht das gewünscht Ergebnis liefern (wahrscheinlich wird es scheitern)- Similar to the Java replaceAll method.
- Use of on
$
und\
inreplacement
: If capturing groups from theregex
are used inreplacement
e.g.$1
, then$1
is not a variable but an identifier ofreplaceAll
similar to the Java methodreplace($myString, 'x', '-->$1<--')
.replacement
. Examples:
Expression replaceAll(
$js7OrderId,
'^#([0-9]{4}-[0-9]{2}-[0-9]{2})#.*$',
'$1'
)
JSON "replaceAll( $js7OrderId, '^#([0-9]{4}-[0-9]{2}-[0-9]{2})#.*$', '$1')"
Sample Value 2021-06-27
Analog zu Javas (replaceAll)[https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replaceAll-java.lang.String-java.lang.String-].
Zur Angabe von
$
und\
inreplacement
: Wenn Gruppen ausregex
inreplacement
verwendet werden, also etwa$1
, dann ist$1
keine Variable der Ausdruckssprache, sondern vonreplaceAll
, wie inreplace($myString, 'x', '-->$1<--')
.replacement
ist also ein String in Apostrophen.replace($myString, 'x', "-->$1<--")
This example extracts the daily plan date from the build-in
$js7OrderId
variable, e.g. from an Order ID#2021-06-27#
P0000000412-jdScheduleBusinessDays
the date is extracted.
jobResourceVariable( string: <JobResource>, string: <Variable> )
- The function provides access to JS7 - Job Resources: it reads from the Job Resource specified with the first argument and returns the value of the Job Resource variable specified with the second argument.
Examples:
Expression jobResourceVariable( 'database', 'db_user' )
JSON "jobResourceVariable( 'database', 'db_user' )"
Sample Value scott Expression jobResourceVariable( 'database_' ++ $country, 'db_user' )
JSON "jobResourceVariable( 'database_' ++ $country, 'db_user' )"
Sample Value tiger
Further Resources
...