I believe Kismet told you how it might work...
Unfortunately, using \ before [ and ]produced the exact same effect as just []. The whole word incased in the brackets disappears along with them

WeiDU always creates new strings with the flags value set to 7. If you really want support for other values and you can find two or three other people who also want it, I will code up the feature.
Well, it would be nice to have this if it's not too much trouble for you. But still, it's just a 'cosmetic' preference, nothing really important.
There is currently no undo support for STRING_SET, mostly because I do not believe in it. Adding undo support for it is on the todo list.
It seamed useful for me as I have found no other way to replace the class/kit descriptions via
WeiDU. It would be nice to have the uninstaller automatically restore the original strings or at least to have an option to let the player/modder do so.
In IWD2 some kit/class description numbers are given in 2DA files (cf. the revised shapeshifting mod for iwd2).
I think there are string references in
BG2 2DAs as well, but I didn't know how to replace the original string number used in a 2DA file with one of my custom strings. Is such an operation possible ?
Since you didn't tell us the manner in which your regular expression failed to work, it's hard for us to fix it.
It didn't work at all, meaning the WEAPPROF.2DA remained unchanged after I used this line in my .tp2:
COPY_EXISTING ~weapprof.2da~ ~override/weapprof.2da~
REPLACE_TEXTUALLY ~2WEAPON.*~ ~2WEAPON (my modified line goes here)~
BTW, I didn't list the whole 2DA line since it's
very long, so just pretend it's there

As you may have noticed, I'm trying to replace one particular line in WEAPPROF.2DA which contains information about proficiency slots of Two Weapon Style (hence the 2WEAPON in the beginning). I hope this clears things up a bit...