|
Copyright ® (1999-2002) EDMGROUP Pty Ltd - EZY Prolog Reference |
main page
It is quite a common task, when someone needs to update bulk of files using update rules. To do so, you have to write program, where you define your logic of update.
EZY Prolog has primitive and powerful language for conditional replacement of the strings and this language consist of only 7 declarations. Conditional string replacement can be programmed via nested declarations.
In general, system uses the following logic for string replacement:
get update rule from the
list and if it is valid
- continue with replacement rules inside this rule.
System will continue with rest of the string.
if previous rule failed - continue with the rest of replacement rules.
What you can do inside replacement rule:
find string and replace it with given string. If successful - continue with text after found string.
check if there given string doesn't exist. If successful - continue with next list of replacement rules
find string, insert given string before found. If successful - continue with text after found string.
find string, insert given string after found. If successful - continue with text after found string.
find any string from the list and replace. If successful - continue with text after found string.
find string and replace. If successful - continue with text after found string.
Generally speaking, this set of domains defines the algorithm of how text will be replaced by calling ezy_replace_string function.
For more information - please see replacement rules and string replacement program.
Copyright © 1997-2003 EDMGROUP (Australia)