/file/filter regex support

Archived from the Transloadit support forum. Originally posted on October 3, 2012; details may be outdated, see our docs for current behavior. Original thread

Can you elaborate on the regex support in the /file/filter robot? Specifically:

  1. what regex library is being used, and
  2. escaping regex escapes (e.g. does /\w+/ for word characters need to be double escaped as "\\w+")

Hey Travis,

here you go:

  1. We use node.js under the hood and javascript borrows its syntax from Perl Regular expressions. We currently do not offer having your own regex modifiers, though, because we did not find any suitable use case in the /file/filter robot space yet. If you find a good use case, please let me know and I’ll add it to the robot.

  2. To match word characters \w+ should be fine. If you have a specific regex you need help with, please let me know.

Here is some additional info about regex in Javascript: http://www.regular-expressions.info/javascript.html

Kind regards,
Tim

Hi Tim,

What do you mean by “We currently do not offer having your own regex modifiers”?