Convert image syntax to Markdown with regex

See here for the original answer.

I have modified your example to get it working here. What you needed to do is escape the square brackets so they would be interpreted literally, since they have special meaning in regex, and you needed to use a capture group to store the matching value in $1 so you could use it in the replacement.

Regular expression:

!\[\[.*\/(.*_image[0-9]{1,2}\.png)\]\]

Substitution format:

![image]\($1\)

Tags

  1. regex (Private)
  2. markdown (Private)
  3. stack-overflow (Private)
  4. answer (Private)