function extractPlaceholders(string) {
  // get placeholders
  let placeholders = []

  // match placeholders identified by {}
  let regex = /(?![^(]*\)|[^[]*]){([^}]+)}/g
  let match = regex.exec(string)
  while (match) {
    // parse placeholder
    if (match[0].split('{').length - 1 === match[0].split('}').length - 1) {
      let parsedPlaceholder = parsePlaceholder(match[0])

      // add to placeholders array
      placeholders.push(parsedPlaceholder)
    }

    // parse next placeholder
    match = regex.exec(string)
  }

  return placeholders
}
Extracts placeholders from a string. Placeholders are identified by {}.

@param {String} string
@returns {Array}