[Solved] Regex for the following expression [closed]


You can use \[.*?\]\{.*?\} on your example which I tested out here.

This breaks into two smaller regex:

  1. \[.*?\], which is the square brackets with any chars inside.
  2. \{.*?\}, which is the curly brackets with any chars inside.

Both of these are using a non-greedy .* inside the brackets. This way if there is more then one match per line, it will not grab both as one match.

6

solved Regex for the following expression [closed]