Remove text from withing Brackets

Advanced Renamer forum
#1 : 29/08-24 08:21
Suny
Posts: 3
Hi, all.

I'm new here.

Does anyone know how to remove everything that is within the brackets, in a Text File.

For example, the text file might include something like this:
(The door opens)

I would like to remove the whole thing, and anything else that might be there in other brackets.

Thanking you in advance.

Suny.
#2 : 29/08-24 18:32
Delta Foxtrot
Posts: 296
Reply to #1:

Hi Suny,

I can't tell from your question if you are asking about removing parts of a text file NAME or parts from within the text file itself. Advanced Renamer only works on changing file NAMES; if that's not your intent you need a "grep" type of file.

If you need to remove brackets, or parentheses, in a filename, see this thread:
https://www.advancedrenamer.com/forum_thread?for um_id=14905

Best,
DF
#3 : 29/08-24 23:32
Suny
Posts: 3
Reply to #2:
Hi.

Thank you for your reply.

My question is about removing parts from withing the text file itself.

So, I'm assuming that I will have to do it manually.

Once again.
Thank you for your reply.

Suny.
#4 : 29/08-24 23:50
Delta Foxtrot
Posts: 296
Reply to #3:

There are tons of grep-style programs out there, both free and for-profit, that will do what you want, just do a search for "grep windows" (or whatever OS you use). I use PowerGREP, a paid program, that is really powerful and will also do file renaming similar to Advanced Renamer; it's a lot more complicated though, than the Unix-style grep programs, even with a GUI. Also expensive. But just look around, you can find something to suit you.

EDIT: Oh, it just occurred to me that most any Windows text editor will do what you want, as long as it has regular expressions. Notepad++ might do the trick for you. END EDIT

Best,
DF

edited: 29/08-24 23:52
#5 : 30/08-24 10:20
Miguel
Posts: 141
Reply to #3:
Hi
As Delta told you can use Notepad++ for removing the brackets and the content. Use the search and replace option. check Regular expression and search :
Search: \(([^)]+)\)
Replace: (empty)

Miguel

#6 : 31/08-24 14:24
Suny
Posts: 3
Reply to #5:
Hi, Miguel.

I even installed Notepad++

And entered in the Search box: \(([^)]+)\)
And left the Reple box empty.

If I could attach an image here, I would show you that it didn't work.

I wish I knew why it's not working for me?

Suny.

EDIT: Sorry Miguel.
I didn't check 'Regular expression'.

After doing that. Guess what? It works.
Many thanks, indeed.

edited: 31/08-24 14:40