Help Removing Parentheses and Text Inside Them + Brackets

A swapping-ground for Regular Expression syntax

Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Mon Jun 08, 2026 5:48 am

Hi all!

As the title says, I would like to remove the parentheses symbols *(), as well as the texts inside them, from a bunch of files. In addition, I would also like I Just the brackets *{} removed, without affecting the text inside.

An example would be:

From this: {{??????????}}?????????

To this: ???????????

I found this thread that explains how to do it, but I'm not getting it to work for me:

viewtopic.php?f=4&t=6690

The expression suggested in that thread only seems to target the parentheses but nothing else. Also. the "Rename" button is greyed out for me. I can't do anything. What am I missing?

Thanks!!
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Mon Jun 08, 2026 5:54 am

I keep forgetting that Japanese characters don't show up in here.

Anyway, the idea is to remove the parentheses (along with the text inside them and the spaces around the parentheses) as well as the brackets (while keeping the text inside them intact).
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby therube » Mon Jun 08, 2026 6:51 pm

Not quite sure if you're looking for parenthesis or brackets (or both at different times).
Anyhow... one method...

3:Replace
Replace: (*)
With:<nul>

should take care of; () (123) (abc) ...
Now there might be some <sp> padding issues, so you could change your Replace:
to something like: Replace:<sp>(*), or whatever works on your end.


---


3:Replace
Replace: [|]
With:<nul>

should take car of; [] [123] [abc]..., leaving <nul>, 123, abc
therube
 
Posts: 1475
Joined: Mon Jan 18, 2016 6:23 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Wed Jun 10, 2026 4:55 pm

Hi!

Thanks for your reply, and sorry for the delay.

I have to be missing something because I’m not seeing BRU changing the names after I input your suggested script. At first I thought it might be due to the Japanese characters, but, even when I tested it with regular characters, it doesn’t seem to be working. I’m selecting everything but the “Rename” button remains greyed out. What am I doing wrong?
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Wed Jun 10, 2026 5:09 pm

Image
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Wed Jun 10, 2026 5:11 pm

I tried posting an image, but this forum is too old lol

Here's the link to the screenshot:
https://1drv.ms/i/c/e60426a810bd8fd8/IQBuhgirJbKlSpDPhglz4xDxARM-URUIOzDwTponvWp8bCA?e=6yuYmX
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby therube » Thu Jun 11, 2026 4:18 pm

Heh, sorry about that.
The <sp> & <nul> are meant to be "place holders" - for characters that you would not normally be able to see.

<sp>, means to hit the spacebar
So <sp>red<sp>or<blue><sp> == " red or blue "

<nul>, simply means that you don't type anything in the box
I.e., what you searched for will simply be removed (rather then replaced), or "replaced" my "nothing" (nul).

(*), will find an open paren, followed by anything, followed by a closing paren
By not entering anything in the With: box, what is found, above, is simply removed

[|], will find an opening bracket OR a closing bracket
By not entering anything in the With: box, any [ OR ] found, is simply removed


Now, how well that works will depend on your data set.
And in that respect, there may be gotchas (unintended results), so you have to review what is being done.

Adding <sp> may or may not matter to you, may remove unintended spacing.
Again, depends on your data set.
"red(or)blue" will fail with a Replace: of <sp>(*)<sp>, because there is no <sp> before or after the parens
"red (or) blue", will be fine with <sp>(*)<sp>

Depends on your data set.

Image

Image



I tried posting an image, but this forum is too old lol


You can hotlink to an external site, assuming that site allows it.
therube
 
Posts: 1475
Joined: Mon Jan 18, 2016 6:23 pm

Re: Help Removing Parentheses and Text Inside Them + Brackets

Postby Jose7822 » Fri Jun 12, 2026 12:50 am

Thank you for the explanation. I knew I had to be doing something wrong lol.

Now I understand how it works, and was even able to figure out why I wasn’t seeing results in the “New Name” pane. It turns out that I had to replace normal parentheses with the Japanese version (which are a little bigger and have spaces on the outside) used in the text I want to modify. It’s working now!

Thank you so much. I truly appreciate it ????
Jose7822
 
Posts: 14
Joined: Wed Dec 25, 2024 1:36 pm


Return to Regular Expressions