Show Table of Contents
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
.propertiesfile format. The followingcustomer.propertiesRegex 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]

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.