Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Regex Inside Properties File
Go
New
Search
Notify
Tools
Reply
  
Regex Inside Properties File
 Login/Join
 
Member
posted
I'm using a XDFileDirListAgent to find the count of files in a directory.

This directory might have other files in it, so I've created the following regex to only count the number of files I'm interested in.

\d{4}-\d{8}-\d{8}-\d{2}-\d{2}-\d{8}-\d{6}\.csv


This works fine when I have this regex inside my selection expression, but when I attempt to move it into a properties file, I always get a count of zero.

I know the properties file is working, as I have many other variables for other objects in there and those are being read fine.

Here is how I'm trying to call my regex from my properties file.

_property(_concat(_sreg(iwayhome), _sreg(myproject.propertyfileloc)), filecountregex)


Here is my regex inside of my properties file.

#File Pattern Regex
filecountregex = \d{4}-\d{8}-\d{8}-\d{2}-\d{2}-\d{8}-\d{6}\.csv


Can anyone tell me why this isn't working?

Thanks.

This message has been edited. Last edited by: benicely,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Reply With QuoteReport This Post
Member
posted Hide Post
I think you need to double all the "\" in the property file since it's interpreted as a string.

It should be like this in your property file
#File Pattern Regex
filecountregex = \\d{4}-\\d{8}-\\d{8}-\\d{2}-\\d{2}-\\d{8}-\\d{6}\\.csv


WebFocus 7.6.8
OS: Windows
iWay: 6.1.4
 
Posts: 15 | Registered: September 14, 2010Reply With QuoteReport This Post
Member
posted Hide Post
That did the trick. Thanks for your help!


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 18 | Registered: September 13, 2012Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Regex Inside Properties File

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.