Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Using regex for File-Type Groups
mikelauruhn
I'm looking to see if anyone has any experience using regular expressions to capture file-type extensions for preprocessing. A majority of the content we are categorizing with MT are TeamSite DCR's and have no extensions. We are able to identify these (extension set to "None" in our File-Type Groups). However, we do NOT have any naming conventions to prevent our contributors from submitting articles that have .'s in the title. While these are DCR's, MT does not process them as it doesn't recognize the extension.
microsoft-2005-12-15 is treated as DCR, as the extension is "blank".
microsoft.2005-12-15 is treated as a ".2005-12-15" file and ignored, even though it is a DCR.
Is there any way to get that second one tagged? and the infinite variations of filenames that contain .'s in them?
Are regexes valid in metatagger.cfg?
Cheers,
MikeL
Find more posts tagged with
Comments
Migrateduser
Mike,
Sorry but there FileTypeGroup filter will kick in before the CP's path regex. The only suggestion I can think of is to create a final processor that resubmits the file with a standard extension if it was not processed. Note that some care needs to be taken to avoid infinite loops. I'll log a feature request for a match-all FTG.
Clark
Adam Stoller
Although not the answer you're looking for - the problem you are having is due to an weakly designed/implemented process for DCR creation which does not require that users adhere to a strict naming convention (manual or automated, the latter being generally better) and thus leaves you with the inability to identify DCRs distinctly.
That being said, however, do you have the ability to look at the *path* of the file - or just the filename?
If you can look at the *path* and it contains templatedata/[^/]+/[^/]+/data/ - then you'd have a pretty high probability of the file being a DCR ...
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com