I'm not such a regex
expert and frankly I'm trying to avoid it whenever I can.
I would like to create a new $String
where the number within the string is updated with +1
. This number can be one or two digits and will always be between 2 brackets.
From:
$String = "\\Server\c$\share_1\share2_\Taget2[1] - 2014-07-29.log"
To:
$String = "\\Server\c$\share_1\share2_\Taget2[2] - 2014-07-29.log"
Thank you for your help.