I need something that will find a word enclosed in two "%" signs, and replace the first `%` with a `[` and the second `%` sign with a `]`.

So in the string "This is dummy text %with% percent signs"
It will then make it "This is dummy text [with] percent signs"

EDIT: Would there be a way to search and replace two different things in the same regex? Like I need to replace %blah% with [blah] but also %~dp1 with [~dp1] the %~dp1 call is in the format %~(could be some letters here)(always ends with a single digit thats how you know the call is over) sorry this is the last thing :)