Skip to Content

Square Brackets in File Event Definitions in Redwood BPA


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

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, 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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 28, 2016 at 07:25 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 02, 2016 at 09:38 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded