- abcd[xyz].txt
I wanted to remove the material between the brackets and thought the following RegExp Rename would do it:
Code: Select all
^([^\[]*) > $1.txtXY is not alone in this behavior. The Regex101 website (with g,m option set) does the same thing. So does an old copy of Regex Designer. The latter two show the capture groups visibly and both are gathering only the "abcd" - but they return $1 as the whole string. That's what puzzles me.
In contrast, RegexBuddy3 (with JavaScript+VBScript option) returns $1 as "abcd", as I would expect.
I went ahead and fixed those files manually, but removing bracket material is a reasonable task. Does anyone know (1) how to do it in an XY regex and (B) why the regex I tried gives such strange results in several engines?
XYplorer Beta Club