cond vpath-regex="^/default/main does not work
Options
I am trying to apply a metadata capture rule using metatagger 3.1 and Teamsite 5.5.2 on a unix system. I have the following lines in my metadata-rules.cfg.
<metadata-rules>
<cond vpath-regex="^/default/main/Sandbox">
<rule name="Default Rule" />
</cond>
but when I try to set metadata on a .txt file in a workarea under the Sandbox branch then it gives me an error message saying that there are no rules for this file type in my metadata-rules.cfg.
However, when I use this line of code instead of the first line listed above, the metadatacapture template works but then it is applied to all branches.
<cond vpath-regex=".">
What code should i use to apply metadata to all files in the default/main/Sandbox branch with a tyw22268 workarea?
<metadata-rules>
<cond vpath-regex="^/default/main/Sandbox">
<rule name="Default Rule" />
</cond>
but when I try to set metadata on a .txt file in a workarea under the Sandbox branch then it gives me an error message saying that there are no rules for this file type in my metadata-rules.cfg.
However, when I use this line of code instead of the first line listed above, the metadatacapture template works but then it is applied to all branches.
<cond vpath-regex=".">
What code should i use to apply metadata to all files in the default/main/Sandbox branch with a tyw22268 workarea?
0
Comments
-
In a regex, the "^" character, when used in the way you used it (it has other meanings when used in different contexts) means "the beginning of the line". So your original regex would only match if "/default" appeared at the beginning of the line being processed. It failed because the actual line being processed probably begins with the store name and not "/default". By taking the "^" out of the regex, it would then look for the string anywhere in the line, which would produce a match if the store name preceeded your string. Make sense? I recommend Jeffrey Friedl's Mastering Regular Expressions book (O'Reilly) to anyone doing anything with regexes.
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.