I'm trying to pass a parameter to create a thumbnail in AWS Elastic transcoder, which shouldn't be that difficult except I know nothing about regular expressions.

My log is giving me the following error:

Member must satisfy regular expression pattern: (^$)|(^.*\\{count\\}.*$)\n

I just need to specify something called 'count' in order for the thumbnail to be created.

This is javascript by the way, if that matters.

Here is the documentation for the parameter:

If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include in the file name for each thumbnail. You can specify the following values in any sequence:

  • {count} (Required): If you want to create thumbnails, you must include {count} in the ThumbnailPattern object. Wherever you specify {count}, Elastic Transcoder adds a five-digit sequence number (beginning with 00001) to thumbnail file names. The number indicates where a given thumbnail appears in the sequence of thumbnails for a transcoded file. If you specify a literal value and/or {resolution} but you omit {count}, Elastic Transcoder returns a validation error and does not create the job.

  • Literal values (Optional): You can specify literal values anywhere in the ThumbnailPattern object. For example, you can include them as a file name prefix or as a delimiter between {resolution} and {count}.

  • {resolution} (Optional): If you want Elastic Transcoder to include the resolution in the file name, include {resolution} in the ThumbnailPattern object.

What would be a valid string specifying 'count'?

I greatly appreciate any help.

| improve this question | | | | |
  • regex101.com/r/x2lqg0/4 -- The valid string is {count}, just like the instructions specify (assuming you don't also include the two backslashes that appear to be escape sequences for a literal string value) – Robert Harvey Oct 4 '16 at 7:19
  • The instructions also say "but you omit {count}, Elastic Transcoder returns a validation error and does not create the job," which is exactly what happened to you. – Robert Harvey Oct 4 '16 at 7:26

See https://regex101.com/r/x2lqg0/4 for an explanation of the regex. It matches any string containing the characters {count}*

You probably want to specify something like this:


which should produce filenames like


and so on.

*(plus some escape characters which are probably not relevant)

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.