Ce contenu n'est pas disponible dans la langue sélectionnée.
3.6. Configuring a Regex ruleBase
- Use this example code to configure a Regex ruleBase:
<?xml version="1.0"?> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:rules="http://www.milyn.org/xsd/smooks/rules-1.0.xsd"> <rules:ruleBases> <rules:ruleBase name="customer" src="/org/milyn/validation/order/rules/customer.properties" provider="org.milyn.rules.regex.RegexProvider"/> </rules:ruleBases> </smooks-resource-list>
- Define the Regex expressions in a standard
.properties
file format. The followingcustomer.properties
Regex rule definition file example shows you how:# Customer data rules... customerId=[A-Z][0-9]{5} customerName=[A-Z][a-z]*, [A-Z][a-z]