Pattern Matching

Pattern Matching

Many portions of the license file can contain patterns . These patterns are useful when you want to match several, a few or a single item. An item might consist of a (user) , <group> , {element} , [VOB] , [VOB:replica] , %view% or @time@ as found in:

or they may be a type item as found in RIN List :

There are three (3) pattern recognized pattern characters that can be used as described below:

Pattern Character Description
* matches any string
? matches any single character
# matches any single digit

These pattern characters can be used to match characters within an item’s pattern area. The pattern area consist of the characters between an item’s initial and terminating characters as descried below:

Item Examples
(User) (bob) (intern_) (sec_#_) (temp_??_service)
<Group> <dev_#> <pra##> <dev?_service>
{Element} {/vobs/pra/bar.c} {/src/} {*.c} {#.???}
[VOB] [\vob_a] [/vob/pra*] [tut] [*] [/vob_?]
[VOB:replica] [\vob_a:atl] [/vob/pra*:sfo] [:usa] [/vobs/cm:] [/vob/*:cm_?]
%view% %import_view% %build_view_% %QA% %% %release_?%
@time@ @D2@ @h3@ @D20050212@ @D2004###5@

NOTES:

  • Adjacent ‘’ characters are treated as a single '’ character
  • A ‘#’ or ‘?’ that directly follows a ‘*’ characters is ignored