Skip to main content
Skip table of contents

Regular Expression (RegEx)

regular expression (usually called regex or regexp) are a sequence of characters which help you search in text (strings). Various systems use Regex for field validation, find or find&replace operations in text (strings). Regex is common in computer science. See Wikipedia Regex for more details.

Regex is used in Picturepark Business Rules or field format validations. Regex is best suited when you have a proper file naming convention in place.

Online tool to test & validate regular expressions:

  • Make sure PCRE is selected in the top right corner

  • Switch between Details and Explain tab

Get specific product code from the filename

The product code must be at the beginning and must be 14 characters long. 


Get any type of product code from the original filename

(?<productCode>^[0-9]{2} [0-9]{3} [^-]*)-(?<filename>.*)

Short Explanation: 

  • Create a group "productCode"

  • Start a the beginning ^

  • Get the first two numbers

  • Get the next three numbers

  • Get the rest until you find a dash - 


Original File name

01 747 7715 7754-Set_HighRes_4035.jpg


productCode (from Regular Expression)

01 747 7715 7754


filenmae (from Regular Expression)


Get code that starts with MT-


Short Explanation: 

  • Create a group "mediaType"

  • Get a code that starts with MT


Original File name



mediaType (from Regular Expression)


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.