Skip Headers

Agile Product Lifecycle Management Agile Configuration Propagation Guide Release 9.3.3 E39285-01 |
| Contents

Previous | Next |

# B Regular Expressions

This appendix describes regular expressions. You can use Java regular expressions to select ACP configuration types or other Administrator objects to propagate (object names are also valid expressions).

## B.1 Java Regular Expressions

Both regular expressions and XML have special characters. The ACP control file uses an XML format, therefore, normal XML characters such as '<' and '>' must be treated differently in a pattern so that XML is not confused. If you want to match on these special characters in a regular expression, you must encode the character so that XML or Java will not interpret the character as a special character.

## B.2 Special Characters

These two tables list special characters you must be aware of. The table "Regular Expression Examples" (below) gives some examples of how to match on the special characters most likely to appear in object names.

### B.2.1 XML Special Characters

Characters | Encoding
--- | ---
& | &amp;
< | &lt;
> | &gt;
" | &quot;

## B.3 Java Regular Expression Special Characters

For a comprehensive reference to Java regular expressions, please refer to Sun's Website (`http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html`) for information in the section, java.util.regex Class Pattern.

Characters | Encoding
--- | ---
\ | \\
. | \.
? | \?
* | \*
+ | \+
^ | \^
$ | \$
[ | \[
] | \]
( | \(
) | \)
{ | \{
} | \}
! | \!
: | \:

## B.4 Regular Expression Examples

Regular Expression | Meaning | Possible Matches
--- | --- | ---
.* | All names | Customers ABC Test_Object Nuts & Bolts Manufacturing Part (Restricted) Object
Test.* | Names beginning with "Test" | Test Test_Object Test 123
.*Test | Names ending with "Test" | Test My Object - Test Object 123 - Test
.*&amp;.* | Names containing an ampersand | Nuts & Bolts Nuts&Bolts
\(Acme\).* | Names that begin with "(Acme)" | (Acme) Object (Acme) Nuts & Bolts
\(Test\) Nuts &amp; Bolts | Name that matches "(Test) Nuts & Bolts" | (Test) Nuts & Bolts
.*\[Dev\] | Names that end with "[Dev]" | Object [Dev] Nuts & Bolts [Dev]
Nuts &amp; Bolts \[Dev\] | Name that matches "Nuts & Bolts [Dev]" | Nuts & Bolts [Dev]