const matchTimestamps = function (inputText) {
  const lengthOfDelimiter = 1 // Have to advance past/before the opening/closing brackets
  let bracketPattern = /\[(\d{1,2}[:.]){1,3}\d{2}\]/g
  let match = bracketPattern.exec(inputText)
  let matches = []
  let startingIndex
  let matchLength

  while (match !== null) {
    startingIndex = (match.index + lengthOfDelimiter)
    matchLength = (bracketPattern.lastIndex - startingIndex - lengthOfDelimiter)
    matches = matches.concat({
      index: startingIndex,
      length: matchLength
    })
    match = bracketPattern.exec(inputText)
  }
  return (matches)
}

module.exports = matchTimestamps

const matchTimestamps = function (inputText) {
  const lengthOfDelimiter = 1 // Have to advance past/before the opening/closing brackets
  let bracketPattern = /\[(\d|:|.)+\]/g
  let match = bracketPattern.exec(inputText)
  let matches = []
  let startingIndex
  let matchLength

  while (match !== null) {
    startingIndex = (match.index + lengthOfDelimiter)
    matchLength = (bracketPattern.lastIndex - startingIndex - lengthOfDelimiter)
    matches = matches.concat({
      index: startingIndex,
      length: matchLength
    })
    match = bracketPattern.exec(inputText)
  }
  return (matches)
}

module.exports = matchTimestamps

Simplify the pattern for matching timestamps
Simplify the pattern for matching timestamps

This new pattern makes less strict assumptions about the structure of the timestamp. But, it also shouldn't accidentally pick up pure numbers (e.g., [22]), nor will it pick up anything with alphanumeric characters.
