Skip to Content
1

Square Brackets in File Event Definitions in Redwood BPA 9.0.17.1

Nov 28, 2016 at 06:37 PM

44

avatar image

Hi,

I am trying to use square brackets to denote sets for wildcard matching filenames, as described on page 482 of the BPA Admin Guide v9 for Version 9.0.12.1.

The manual claims "A filename is a wildcard pattern if it contains one of the characters ?, * or [."

Below that, it describes how to use the character classes, for example [abc]123.txt should match a123.txt, b123.txt and c123.txt, but not d123.txt, or [0-9] should match any digit.

I've tried using these in file events in BPA 9.0.17.1, but the file events are not triggering, while other wildcard patterns containing ? and * are working fine.

Has anyone else tried using [ and ] for wildcard matches? Any issues?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Dallas Beahm Nov 28, 2016 at 07:25 PM
1

After doing some testing, I'm going to answer my own question...

It seems that square brackets alone will not make a pattern into a wildcard pattern. It must contain a * or ? to make it wildcard...

For example, [abc]123.txt does not match a123.txt, but if I make the expression [abc]12?.txt or [abc]123.*, then it matches.

Another test I tried was [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].txt (for example to match a YYYYMMDD.txt type of filename). This would not work, but if I changed it to [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].*, it would match.

So in summary, include a * or ? somewhere in the pattern, and the [ ] sets will work.

Share
10 |10000 characters needed characters left characters exceeded
G. Blom Dec 02, 2016 at 09:38 PM
0

Thanks Dallas for sharing your answer.

Since the move to the new site the RSS feed is not available anymore so I dont get all questions directly anymore.

Share
10 |10000 characters needed characters left characters exceeded