.. highlight:: xml .. index:: Use or Regular Expressions .. _use_of_regexp: Use or Regular Expressions to Select DataPower Objects ====================================================== Many DPBuddy tasks/commands can be applied to multiple DataPower configuration objects. You can see a full list of the configuration objects available in your environment by expanding "Objects" in the DataPower WebGUI. Each object has a "class" (type) and a name. Classes are defined in the :ref:`DataPower XML Management schema `. You can see the list of all classes under the definition of "AnyConfigElement" in "xml-mgmt.xsd". If you look at any DataPower configuration file created using :ref:`export`, child elements of the "configuration" element are class names. DPBuddy allows for using regular expressions to match DataPower objects. For example, :ref:`delConfig` task supports nested ``object`` elements defining what configuration objects to delete. Similarly, the :ref:`export` task's nested ``exportObject`` elements define what objects to export. You can also use the ``classPattern`` and ``namePattern`` options/attributes to specify the regexps. These options should be used with DPBuddy CLI. Nested elements are not supported by DPBuddy CLI commands; they are only supported by Ant tasks. DPBuddy selects objects based on matching class names and/or object names. Only one of the two is required; you can select configuration objects based on just the class name, based on just the object name, or based on both. In the case of :ref:`export`, all objects will be selected if both class and name attributes are omitted. Note that your regular expression needs to match the entire name and not just a substring within a name, so use ".*" where needed. Examples ^^^^^^^^ Match all HTTP front side handlers: .. code-block:: xml Match all objects (irrespective of the class) with the name starting with "Test": .. code-block:: xml Match all HTTP front site handlers whose name starts with "Test": .. code-block:: xml You can use "or" regular expressions if you need to select objects matching multiple classes and/or names. The example below selects all WS proxies and firewalls: .. code-block:: xml